AI OnAI Off
Hi,
I'm not sure how to do this because you configured a fallback language. What I do know is that you could hook into the functionality where EPiServer sets the ContentLanguage and replacement language. I wrote a blog about it last week: http://www.patrickvankleef.com/2015/02/13/force-a-page-to-display-in-a-specific-language-dynamically/
Patrick
Hi colleagues,
I have page created on 'EN' language (page id: 6068) and fallback sv->en.
I switch the language to 'SV' in the admin mode (url: http://localhost:81/EPiServer/CMS/?language=sv#context=epi.cms.contentdata:///6068) and see page on 'EN' language.
How do I get 'SV' language on the page (not from url)?
OR Is it possible to determine once the page has not yet been translated into 'SV'?
The following options are returned 'EN' language:
1) var pageRouteHelper = ServiceLocator.Current.GetInstance();
var c = new LanguageSelectorContext(pageRouteHelper.Page);
LanguageSelector.AutoDetect(false).SelectPageLanguage(c);
2) ContentLanguage.PreferredCulture.Name
...
Thanks