How To Load Different CSS Style, Based On Language When Using QtranslateX [closed]

You have lots of options to achieve this.

First of all, the easy way:

Qtranslate-X adds a language class to your body tag. So if you want to only have minor tweaks, you can use this in your style.css:

.de #page {
    background:#000;
}

.en #page {
    background:#FFF;
}

If you need big changes (like, you need different css-files per language), you can use the function qtranxf_getLanguage() in your themes enqueue_scripts action like this:

Lets say you save your styles for german language version in the file styles-de.css and for english language in styles-en.css. You now enqueue the correct style like this:

function mytheme_language_scripts() {
    $langcode = qtranxf_getLanguage();
    wp_enqueue_style( 'lang-style', bloginfo('stylesheet-directory').'/styles-'.$langcode.'.css' );
}

add_action( 'wp_enqueue_scripts', 'mytheme_language_scripts' );

Happy Coding,
Kuchenundkakao

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)