But i have another requirements that i summarize with:
when the user access http://www.mygreatsite.com , read from the request object the language code so when it lands on the login page you could show it in the right language from the beginning.
You could create a user control macro, that you drop at the top of your master page (if you have a master page, that all your other master pages extend from, this would be the best place). Then in that user control, on init, check the culture and store in a session variable or similar so you only check once per request.
var defaultLanguage =System.Configuration.ConfigurationSettings.AppSettings["DefaultLanguageRedirect"]; if(!String.IsNullOrEmpty(defaultLanguage)) { Response.Redirect(defaultLanguage); } Response.Redirect("/nl"); }
</script>
ps. the alternative approach does not mean you need a subdomain for each language, and gives you SEO for each language instead of 1 url showing 3 languages, confusing google
Multi Language site 1:1 Approach, accessing user language info from the web request
Hello and thanks in advice.
I'm new to umbraco and first of all i wanna say my little thanks for this great product.
I'm building a multilanguage web-site with the 1:1 approach, multiple domains are not an option.
I've read the tutorial at http://umbraco.org/documentation/books/multilingual-11-sites, it explains the most of the work i have to do.
But i have another requirements that i summarize with:
when the user access http://www.mygreatsite.com , read from the request object the language code so when it lands on the login page you could show it in the right language from the beginning.
May be better explained here http://www.west-wind.com/weblog/posts/334.aspx
Could someone tell me the "right" way and place to do that?
Thanks again
Fabio
Hi Fabio.
You could create a user control macro, that you drop at the top of your master page (if you have a master page, that all your other master pages extend from, this would be the best place). Then in that user control, on init, check the culture and store in a session variable or similar so you only check once per request.
Matt
Here is a usercontrol that detects the language, you'll have to change it a little bit to make it do exactly what you want it to though:
http://our.umbraco.org/forum/using/ui-questions/2814-MultiLanguage-same-Domain-?p=3
ps. the alternative approach does not mean you need a subdomain for each language, and gives you SEO for each language instead of 1 url showing 3 languages, confusing google
live example using this method: www.recytyre.be
thanks Matt and Rick for the fast answer ,
i'm feeling a bit like a donkey !:-)),
2 seconds after i hitted submit i found the post Rick Mentioned
Thanks anyway.
i'm trying to mark this thread as solved, but i can't find the "solved" button,
Could someone tell me where can i find the button.
Fabio
There should be an icon below each persons name. Just click the one below the correct answer.
Many thanks
Matt
is working on a reply...