Search code examples
dotnetnukedotnetnuke-7

How to use different css for different languages in dnn?


I'm using a dnn portal with two languages,English and Persian,in my Persian portal text direction is rtl and aligned right, when I change language to English,text align correctly change, but there is no change in menu bar and it still remain as right aligned, how can I use different css for each of my languages?


Solution

  • after creating a copy of skin.css do that

    in your site root file Default.aspx.cs replace

    ClientResourceManager.RegisterStyleSheet(this, ctlSkin.SkinPath + "skin.css", FileOrder.Css.SkinCss);
    

    with

    if (System.Threading.Thread.CurrentThread.CurrentCulture.Name == "en-US")
    {
        ClientResourceManager.RegisterStyleSheet(this, ctlSkin.SkinPath + "skin.css", FileOrder.Css.SkinCss);
    }
    else
    {
        ClientResourceManager.RegisterStyleSheet(this, ctlSkin.SkinPath + "arabicskin.css", FileOrder.Css.SkinCss);
    }