woocp_plugin_textdomain

Load Localisation files.

Description

woocp_plugin_textdomain(); 

Note: the first-loaded translation file overrides any following ones if the same translation is present.

Locales found in: - WP_LANG_DIR/woocommerce-compare-products/woocommerce-compare-products-LOCALE.mo - /wp-content/plugins/woocommerce-compare-products/languages/woocommerce-compare-products-LOCALE.mo (which if not found falls back to)


Usage

  1. if ( !function_exists( 'woocp_plugin_textdomain' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-compare-products-lite/compare_products.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = woocp_plugin_textdomain(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/compare_products.php  
  1. function woocp_plugin_textdomain() { 
  2. $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-compare-products' ); 
  3.  
  4. load_textdomain( 'woocommerce-compare-products', WP_LANG_DIR . '/woocommerce-compare-products/woocommerce-compare-products-' . $locale . '.mo' ); 
  5. load_plugin_textdomain( 'woocommerce-compare-products', false, WOOCP_FOLDER . '/languages/' );