WordPress at Your Fingertips
function is not described

WooCommerce::load_plugin_textdomain() public WC 1.0

Load Localisation files.

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

Locales found in:

- WP_LANG_DIR/woocommerce/woocommerce-LOCALE.mo
- WP_LANG_DIR/plugins/woocommerce-LOCALE.mo

{} It's a method of the class: WooCommerce{}

Hooks from the method

null. Nothing.


$WooCommerce = new WooCommerce();

Code of WooCommerce::load_plugin_textdomain() WC 5.6.0

public function load_plugin_textdomain() {
	$locale = determine_locale();
	$locale = apply_filters( 'plugin_locale', $locale, 'woocommerce' );

	unload_textdomain( 'woocommerce' );
	load_textdomain( 'woocommerce', WP_LANG_DIR . '/woocommerce/woocommerce-' . $locale . '.mo' );
	load_plugin_textdomain( 'woocommerce', false, plugin_basename( dirname( WC_PLUGIN_FILE ) ) . '/i18n/languages' );