WooCommerce::load_plugin_textdomain()
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
Метод класса: WooCommerce{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
$WooCommerce = new WooCommerce(); $WooCommerce->load_plugin_textdomain();
Код WooCommerce::load_plugin_textdomain() WooCommerce::load plugin textdomain WC 9.3.3
public function load_plugin_textdomain() { $locale = determine_locale(); /** * Filter to adjust the WooCommerce locale to use for translations. */ $locale = apply_filters( 'plugin_locale', $locale, 'woocommerce' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment 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' ); }