• Is there any way we can change locale programmatically using qtranslate function ? Is there any function available for that ? I need to send woocommerce email in two langauge (within same email) means if any other language selected apart from english e.g french, we need to send email in french and english, if spanish then spanish and english. Is there any way we can achieve that ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • None I know of, unless you modify the plugin files itself:

    file: qtranslate_utils.php
    add function:
    function qtranxf_setLanguage($lang) {
    global $q_config;
    $q_config[‘language’] = $lang;
    qtranxf_set_language_cookie($lang);
    }

    and then just: qtranxf_setLanguage(‘de’);

    Thread Starter swayam.tejwani

    (@swayamtejwani)

    Thank you piotrku, i will try this out, i think we can add this function to our theme functions.php, why to modify plugin file if its a stand alone function.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to switch language programatically’ is closed to new replies.