From e5556af3cae702c7e90e7a71f04f0ba79c41850e Mon Sep 17 00:00:00 2001 From: Geert De Deckere Date: Thu, 3 May 2012 13:48:35 +0200 Subject: [PATCH] Apply the filter "plugin_locale" to the locale for loading language files from the WP_LANG_DIR --- woocommerce.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/woocommerce.php b/woocommerce.php index de2ab856a93..13562aea09d 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -282,10 +282,11 @@ class Woocommerce { **/ function load_plugin_textdomain() { // Note: the first-loaded translation file overrides any following ones if the same translation is present + $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce' ); $variable_lang = ( get_option( 'woocommerce_informal_localisation_type' ) == 'yes' ) ? 'informal' : 'formal'; - load_textdomain( 'woocommerce', WP_LANG_DIR.'/woocommerce/woocommerce-'.get_locale().'.mo' ); + load_textdomain( 'woocommerce', WP_LANG_DIR.'/woocommerce/woocommerce-'.$locale.'.mo' ); load_plugin_textdomain( 'woocommerce', false, dirname( plugin_basename( __FILE__ ) ).'/languages/'.$variable_lang ); - load_plugin_textdomain( 'woocommerce', false, dirname( plugin_basename( __FILE__ ) ).'/languages'); + load_plugin_textdomain( 'woocommerce', false, dirname( plugin_basename( __FILE__ ) ).'/languages' ); } /**