Language question in Episerver 4.60

Vote:
 
Hi, I've just upgrade from 4.51 to 4.60 and is using "globalization". Very impressed with the new language features! In edit mode I'm able to select the different languages from a dropdown list. On a certain edit page I have a custom property to needs to know in what language mode the current edit page is. Does anyone know how to get language key (e.g. EN) in the custom property's class ? Thanks! Danie
#12582
Mar 25, 2008 18:35
Vote:
 
It kind of depends why you need it, a language specific property will always live on a single language but common will live on all languages. Our built in Edit page will always force LanguageContext.Current.CurrentLanguageBranch to the language of the current page being edited if that solves your problem. string langCode = LanguageContext.Current.CurrentLanguageBranch; You may also override InitializeData that will be called for every language that you property lives on. public override void InitializeData(ApplicationConfiguration config,PropertyDataCollection prop) { bool isLangSpecific = base.IsLanguageSpecific; string langBranch = prop["PageLanguageBranch"]!=null ? (String)prop["PageLanguageBranch"].Value : null; base.InitializeData(); }
#14544
Mar 25, 2008 18:45
* 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.