Wednesday 21 May 2008

Sitecore and Languages

My customer uses translation services and employees to do all the necessary translation work. They have a very good web application for that and utilize those translations on their current homepages.

To shorten that story a little bit, every text is represented using "webkeys" in the form [key=KeyName] and is then translated "on the fly" into the text and language necessary for display.

Not all developers know of ISO Standards, or are able to use the correct one. So for some languages, instead of the Language Identifier, the Country Code has been taken.

Now two options:

1) In Sitecore add the correct language, create either some Sitecore Items to tranlsate from Correct to Wrong Language Identifier, add code to perform the translation, eventually add a cache and manage it, go to the translation db and request translations for your keys.

2) Create Custom Cultures, e.g. reigster the wrong Language Code in the system, in Sitecore add the Language with the "wrong" ISO code, no other changes, no cache, no additional code.

To work with option two - download Sitecore`s Language Registration Tool and register the Language Code.

Sitecore Language Registration tool

In the above screen shot you can see that I registered  a language "cz", so I now can use the language identifier cz in Sitecore.