Hi everyone, recently I needed to investigate a little bit of Umbraco CMS, pretty nice CMS by the way; I needed to figure out how to create a site with multiple languages, so the first thing i did was to check how can i have my main site in different languages.
My first headache was trying to make my site to have more than one language... wrong, although it is not impossible, if you want to have more than one language per site, then you may need to use resources for all contents and then define a laguange per host, so the correct way to work this out with Umbraco is having a site per language, for example, a main English site, and a secondary danish site... this would mean like... duplicating all work? No... wait.. it is not that bad! Umbraco can share templates and stuff, so the only thing you my need to duplicate is the site structure and the text content 
But now... how can we tell Umbraco which is the correct site for the language? Each site in umbraco can have more than one host, each host is tide to a language... how can we do this? pretty easy... just right click on the site we like and then click the option "Mange Hostnames", there we will be able to type a host name for our application and assign the correct language, this means that internally, .Net will figure out which is the current culture and pass it through the different pages and user controls, this doesn't affect the text content, since it is already typed in the correct language, but it is necessary for any custom code you may use, for example User controls.
Now, we already have the current culture... pretty easy now.. right? The correct display of words in the respective language is up to you... you can do it the way you want... using asp.net Resources (using the famous App_GlobalResources folder), or retrieving the contents from a DB or whatever. In my case... it is pretty usefull to use with Microsoft Commerce Server, since I can get the products in the correct language 
Hope it Helps! Let me know what you think!
Add comment