Skip to content

Commit

Permalink
Wrong paths woocommerce#2051
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Dec 30, 2012
1 parent 0161ceb commit 1d67070
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,13 @@ public function load_plugin_textdomain() {

load_textdomain( 'woocommerce', WP_LANG_DIR . "/woocommerce/woocommerce-$locale.mo" );

if ( is_admin() )
load_textdomain( 'woocommerce', WP_LANG_DIR . "/woocommerce/woocommerce-admin-$locale.mo" );
// Load admin specific MO files
if ( is_admin() ) {
if ( file_exists( WP_LANG_DIR . "/woocommerce/woocommerce-admin-$locale.mo" ) )
load_textdomain( 'woocommerce', WP_LANG_DIR . "/woocommerce/woocommerce-admin-$locale.mo" );
elseif ( file_exists( $this->plugin_path() . "/i18n/languages/woocommerce-admin-$locale.mo" ) )
load_textdomain( 'woocommerce', $this->plugin_path() . "/i18n/languages/woocommerce-admin-$locale.mo" );
}

load_plugin_textdomain( 'woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . "/i18n/languages/$formal" );
load_plugin_textdomain( 'woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . "/i18n/languages" );
Expand Down

0 comments on commit 1d67070

Please sign in to comment.