Tag: Culture
Sidan är inte tillgänglig för aktuellt språk / This page is not available for the active language – EPiServer5 Upgrade to SP2
by Rizo on sep.11, 2009, under Developing
After upgrading EPiServer CMS5 r2 to CMS5 r2sp2 you might get a nice little error in edit mode. This page is not available for the active language. This is due globalization changes and the workaround is to activate a language for your site. To do this do the following:
1. Go to admin mode
2. Click on Config
3. Go to systemsettings
4. Activate Globalization
5. Go to Edit mode
6. click on Language Settings
7. Chose the default language
8. Go back to admin mode
9. Turn off globalization
This should do the trick. Remeber, if you have several sites, you need to click on the root of each one of them and set the language settings on all of them.
EPiServer CMS 5 Wrong culture language
by Rizo on mar.02, 2009, under Developing
So during an upgrade to EPiServer 5, I ran into this problem where the culture was wrong and all translations were being translated to English instead of Swedish, this even though the web.config was correctly changed to ”sv-SE”.
After som trial and error I got to set the culture in onpreinit in the a class that inherits templatepage like this
EPiServer.Globalization.UserInterfaceLanguage.Instance.SetCulture(”sv-SE”)
EPiServer.Globalization.SystemLanguage.Instance.SetCulture(”sv-SE”)
The problem was that only the dates were being formatted correctly, but the translation was still wrong. CurrentPage.LanguageID was not of much help either as it was set to english. At last I found out that you just need to send the short version of the culture to make it work. i.e
EPiServer.Globalization.UserInterfaceLanguage.Instance.SetCulture(”SV”)
EPiServer.Globalization.SystemLanguage.Instance.SetCulture(”SV”)
This did the trick and now everything is in the right format.