Hi ...
For use both RTL and LTR layout i get the idea from this topic http://forums.nopcommerce.com/forums/default.aspx?g=posts&t=204]http://forums.nopcommerce.com/forums/default.aspx?g=posts&t=204 (thanks to http://forums.nopcommerce.com/forums/default.aspx?g=profile&u=13]qais.
with a little change as follow:
1.Goto Administration Area -> Content management -> Localization -> choose your RTL Language and add a new Resource name
Other.PageDirection and set the value to RTL
2.copy your RTL theme in app_Themes
3.define a new setting for RTL theme in Administration -> Configuration -> All Setting : Add New .
setting name :
Display.PublicStoreThemeRTL setting Value:
darkOrangeRTL (or whatever you named it)
4.then in the
BaseNopPage class (controls/BaseNopPage.cs), change OnPreInit event :
protected override void OnPreInit(EventArgs e)
{
//string publicStoreTheme = SettingManager.GetSettingValue("Display.PublicStoreTheme");
/* Add by phi-------*/
string publicStoreTheme;
Language language = NopContext.Current.WorkingLanguage;
if (LocalizationManager.GetLocaleResourceString("Other.PageDirection", language.LanguageID) == "RTL")
{
publicStoreTheme = SettingManager.GetSettingValue("Display.PublicStoreThemeRTL");
}
else
{
publicStoreTheme= SettingManager.GetSettingValue("Display.PublicStoreTheme");
}
/*-------- Add by phi*/
if (!String.IsNullOrEmpty(publicStoreTheme))
{
this.Theme = publicStoreTheme;
}
base.OnPreInit(e);
}
note : in this method i assume that your default page direction is LTR(i mean , you set a LTR theme in Administration -> configuration -> Global Setting - seo/display : Store theme)