Try our conversational search powered by Generative AI!

Translations always showing english in globalized site


I have an issue with a globalized multi-site always showing english XML texts - regardless of what site language is set.

This happened after the upgrade to 7. I have installed all of the latest patches for 7.

Any ideas?

Jul 15, 2013 11:44

I'm suspecting this change in web.config may have something to do with it:


<globalization culture="en-US" uiCulture="en" requestEncoding="utf-8" responseEncoding="utf-8" resourceProviderFactoryType="EPiServer.Resources.XmlResourceProviderFactory, EPiServer" />



<globalization culture="en-US" uiCulture="en" requestEncoding="utf-8" responseEncoding="utf-8" resourceProviderFactoryType="EPiServer.Framework.Localization.LocalizationServiceResourceProviderFactory, EPiServer.Framework" />

Jul 15, 2013 12:03

Hi, Oerjan,

The setting in web.config is correct.

How do you translate? Do you use LocalizationService.Current.GetString("/xx/yy")?

Jul 15, 2013 13:42


I've tried both LocalizationService.Current.GetString("/xx/yy") and the obsolete way LanguageManager.Instance.Translate("/xx/yy").

Jul 15, 2013 13:52

If I understand your problem correctly, this is bug #95725

Jul 15, 2013 19:42


Yes, it fits my description, except for this part: "When browing in View mode (outside EPiServer UI) everything seems ok, I can switch language by browsing with different language prefix in the url exactly like everything is supposed to behave."

In that case, I guess my translations should have been displayed just fine when I'm viewing the page not-logged in?

Jul 16, 2013 8:07

Yes, that's correct. I only had this problem when I'm in Edit mode. While in View mode/not logged in I had no problems at all.

Could you check what preferred language you're on when browsing?

Jul 16, 2013 8:56

When debugging, I see that CultureInfo.CurrentUICulture is "en" when it should have been norwegian "no".

ContentLanguage.PreferredCulture however, is "no".

Edited, Jul 16, 2013 12:30

Same problem here Ørjan. Solution is EPiServer 7.1 with two languages, Norwegian and English. On English pages all of the lang text is in Norwegian. 


When on "/en" page following happens:

<% = CultureInfo.CurrentUICulture.DisplayName %>

shows Norwegian

<%= CurrentPage.Language.DisplayName %>

shows English


According to EPiServer support "CultureInfo.CurrentUICulture" is used in all of the following:

<EPiServer:Translate Text="/bw/usercontrols/logIn/mypage" runat="server" />


<%= LocalizationService.Current.GetString("/bw/usercontrols/logIn/mypage") %>

<%= Translate("/bw/usercontrols/logIn/mypage") %>


This one works however, but shouldn't be necessary:

<%=LocalizationService.Current.GetStringByCulture("/bw/usercontrols/logIn/mypage", CurrentPage.Language)%>


One more thing is that Translate seems to work only for one language at a time. Changing configuration from

<globalization culture="nb-NO" uiCulture="no"


<globalization culture="en-US" uiCulture="en"

shows lang text in English on both "/en" and "/no" pages.


I'm in dialog with EPiServer support, and will post any new findings here.

Edited, Mar 17, 2014 12:41

This did it for me!

Fix for Webforms is to make all UserControls inherit from SiteUserControl<SitePageData> and all templates fromSiteTemplatePage<SitePageData>. You can then simply set CurrentUICulture inside constructor for SitePageData:


public class SitePageData : PageData


    public SitePageData()


        if (ContentLanguage.PreferredCulture.LCID != Thread.CurrentThread.CurrentUICulture.LCID)


                Thread.CurrentThread.CurrentUICulture = new CultureInfo(ContentLanguage.PreferredCulture.LCID);





Fixfor Mvc is to make all of your Controllers inherit from BasePageController and add following override:


protected override IAsyncResult BeginExecute(System.Web.Routing.RequestContext requestContext, AsyncCallback callback, object state)


    if (ContentLanguage.PreferredCulture.LCID != Thread.CurrentThread.CurrentUICulture.LCID)


        Thread.CurrentThread.CurrentUICulture = new CultureInfo(ContentLanguage.PreferredCulture.LCID);



Mar 18, 2014 9:01

Small adjustment for Webforms projects. Adding following code to SiteMasterPage which all of the other masterpages inherit from did the trick for me.

protected void Page_Init(object sender, EventArgs e)
   if (ContentLanguage.PreferredCulture.LCID != Thread.CurrentThread.CurrentUICulture.LCID)
      Thread.CurrentThread.CurrentUICulture = new CultureInfo(ContentLanguage.PreferredCulture.LCID);

Mar 18, 2014 10:31
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.