In my current project, I have got one situation where I have to use Serbian language for one of our sites. On further investigation, I have found that Predefined Language Code for Serbia is not coming up in drop down of Globalization Control Panel in Sitecore.
Thus I have decided to add custom Language-Country Code sr-RS for Serbia. Unfortunately, I was getting below error while adding custom Language-Country Code sr-RS.
sr-RS is not a valid Language-Country Code. Sitecore uses culture mechanisms of the .Net Framework. Following Language-Country Codes are available for Serbia in .Net Framework 4.0:
In my case, sr-Latn-RS is the appropriate Language Country Code for the website. You can add any .Net framework supported Culture Code as per your requirement. Below are the steps of adding custom Language Country Code (sr-Latn-RS) for Serbia in Sitecore:
Comments and suggestions are most welcome. Happy coding!
Thus I have decided to add custom Language-Country Code sr-RS for Serbia. Unfortunately, I was getting below error while adding custom Language-Country Code sr-RS.
sr-RS is not a valid Language-Country Code. Sitecore uses culture mechanisms of the .Net Framework. Following Language-Country Codes are available for Serbia in .Net Framework 4.0:
Language-Country code | Culture |
---|---|
sr | Serbian |
sr-Cyrl | Serbian (Cyrillic) |
sr-Cyrl-BA | Serbian (Cyrillic, Bosnia and Herzegovina) |
sr-Cyrl-CS | Serbian (Cyrillic, Serbia and Montenegro (Former)) |
sr-Cyrl-ME | Serbian (Cyrillic, Montenegro) |
sr-Cyrl-RS | Serbian (Cyrillic, Serbia) |
sr-Latn | Serbian (Latin) |
sr-Latn-BA | Serbian (Latin, Bosnia and Herzegovina) |
sr-Latn-CS | Serbian (Latin, Serbia and Montenegro (Former)) |
sr-Latn-ME | Serbian (Latin, Montenegro) |
sr-Latn-RS | Serbian (Latin, Serbia) |
- Login to Sitecore Instance: Desktop Mode.
- Click on Sitecore Menu -> Control Panel -> Globalization -> Add a new language
- You’ll get following pop up screen where you can add custom Language Code in Sitecore.
- Enter sr in Language textbox and Latn-RS in Country/Region Code textbox. Click on Next.
- Add file path of Spellchecker dictionary. This is optional step. You can ignore this step and click on Next without entering Spellchecker file path. You can read more about Adding Dictionaries to the Spellchecker.
- Click on Finish.
- You can see Sitecore Language Item at /sitecore/system/Languages/sr-Latn-RS path in Sitecore content tree.
Comments and suggestions are most welcome. Happy coding!
0 comments :
Post a Comment