fixed the translation load

This commit is contained in:
claudiosmweb 2014-05-29 17:06:03 -03:00
parent 02b5f21168
commit cf1c0aaeaf
1 changed files with 5 additions and 4 deletions

View File

@ -408,16 +408,17 @@ final class WooCommerce {
*/
public function load_plugin_textdomain() {
$locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce' );
$dir = trailingslashit( WP_LANG_DIR );
// Admin Locale
if ( is_admin() ) {
load_textdomain( 'woocommerce', WP_LANG_DIR . "/woocommerce/woocommerce-admin-$locale.mo" );
load_textdomain( 'woocommerce', dirname( __FILE__ ) . "/i18n/languages/woocommerce-admin-$locale.mo" );
load_textdomain( 'woocommerce', $dir . 'woocommerce/woocommerce-admin-' . $locale . '.mo' );
load_textdomain( 'woocommerce', $dir . 'plugins/woocommerce-admin-' . $locale . '.mo' );
}
// Global + Frontend Locale
load_textdomain( 'woocommerce', WP_LANG_DIR . "/woocommerce/woocommerce-$locale.mo" );
load_plugin_textdomain( 'woocommerce', false, plugin_basename( dirname( __FILE__ ) ) . "/i18n/languages" );
load_textdomain( 'woocommerce', $dir . 'woocommerce/woocommerce-' . $locale . '.mo' );
load_plugin_textdomain( 'woocommerce', false, $dir . 'plugins' );
}
/**