November Happy Hour will be moved to Thursday December 5th.

Programmaticllay detecting language

Vote:
 

Hello,

I would like to know how I could programmatically detect the current language in EPiServer and also how to change it assuming the entire site has been designd to display all its content from external language files.

Thank you

#40032
Jun 09, 2010 11:22
Vote:
 

The PageData object has a list of the languages it exists in the property PageLanguages. You could also use the LanguageID property or LanguageBranch to check which language your current object is.

To change the language, you should take a look at Adam's blog post: http://blog.najmanowicz.com/2009/04/06/advanced-language-manipulation-tool-for-episerver/

#40056
Jun 09, 2010 14:23
Vote:
 

Hi Lars and thank you for your response. I was wondering if its possible to introduce functionality to allow the user to change the language to their preferred language.

For example, this page http://news.bbc.co.uk/ allows users to change the language by clicking on one from the bottom of the left menu under 'Languages'.

any thoughts?

thanks

#40066
Edited, Jun 09, 2010 15:04
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.