Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Gunu

    (@grafcom)

    @alessgerman,

    try qtranxf_getLanguage instead of qtrans_getLanguage

    Success

    Thread Starter alessgerman

    (@alessgerman)

    Thanks for the quick reply!
    It’s still not working unfortunately.

    I tried to go about it another way, by putting the language-specific styles in separate stylesheets, and tried to write a function to choose the right stylesheet (My current theme makes it kind of hard to edit the HTML directly), but I’m new to writing WordPress functions, and it didn’t work:

    function language_stylesheet(){
    if (qtranxf_getLanguage()==’en’){
    echo’
    <link rel=”stylesheet” href=”english.css”>’;
    }
    else{
    echo'<link rel=”stylesheet” href=”japanese.css”>’;
    }
    }
    add_action(‘wp_head’,’language_stylesheet’);

    Plugin Author Gunu

    (@grafcom)

    @alessgerman,

    have you solved this?

    Thread Starter alessgerman

    (@alessgerman)

    I found something which worked!
    Using the lang selector:

    :lang(ja){
    /* Japanese-only styles */
    }

    :lang(en){
    /* English-only styles */
    }

    Thanks for all your help!

    Hello alessgerman,

    I need to set a different style of color and size and font type for my French / Chinese website…

    could you be a little more specific of the code to set ?

    I am not a very good coder…

    should it be smth like that ?

    :lang(zh){font-family:"宋体", "SimSun", "华文细黑", "STXihei",  sans-serif ; color: #000000; font-size: 16px;  line-height: 25px;font-weight:300;
    }
    
    :lang(fr){font-family: 'Open Sans', sans-serif ; color: #00ff00; font-size: 14px;  line-height: 25px;font-weight:300;
    }

    thank you in advance for your answer

    Plugin Author Gunu

    (@grafcom)

    @petri71

    Ask this question in the new Support Forum

    Read also this topic: ANNOUNCEMENT

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Different CSS styles for each language’ is closed to new replies.