Notifications emails in diferent languages (solved)
-
Hi, I solved my problem of emails sent in wrong language changed woocommerce.php, change a function load_plugin_textdomain() in the woocommerce.php file. Create a folder “woocommerce” in languages directory and put po mo files inside (name example: woocommerce-pt_PT.mo).
Code:public function load_plugin_textdomain() { $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce' ); /////////// Change language emails woocommerce if (qtrans_getLanguage() == "pt") { load_textdomain( 'woocommerce', WP_LANG_DIR . '/woocommerce/woocommerce-' . "pt_PT" . '.mo' ); } if (qtrans_getLanguage() == "en") { load_textdomain( 'woocommerce', WP_LANG_DIR . '/woocommerce/woocommerce-' . "en_GB" . '.mo' ); } load_plugin_textdomain( 'woocommerce', false, plugin_basename( dirname( __FILE__ ) ) . '/i18n/languages' ); }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Notifications emails in diferent languages (solved)’ is closed to new replies.