Change locale with page requests

Topics: Localization
Jan 22, 2013 at 7:54 AM

Hi All,

I'm new to Orchard and still in testing phase but till now I find it a very interesting CMS.

I'm trying to build a bilingual website (English & Arabic).

I've installed the Culture Picker module (1.6), and switching between languages is working fine. I've even added a custom code in Layout.chtml in my theme to load an RTL CSS file for Arabic pages.


My problem now is that when, for example, the current culture is en-US and I enter the url of and Arabic page, the culture remains en-US and not switch to ar-EG unless I choose it from the culture picker widget.

My question is: Is there a way to change the culture according to the current page culture?

Jan 22, 2013 at 8:44 AM

I haven't tried it, but this modules seems to provide a feature that may help. If not, it probably contains code that could help when you writing a custom handler that switches between cultures based on the culture of your page.


Jan 22, 2013 at 9:55 AM
Edited Jan 22, 2013 at 9:56 AM

@sfmskywalker: Thanks for your reply.

I've tried this module, but it conflicts with Culture Picker. I ended up disabling culture picker, but I lost Menu Localization Filter!!

And now, the html lang attribute is "ar" instead of "ar-EG".

I'm a bit confused right here :)

Jan 22, 2013 at 11:00 AM

Nevermind! I found out where the problem was.. working perfectly


Many thanks :)