LLMS_Blocks::load_textdomain()

Load l10n files.


Description Description

This method is only used when the plugin is loaded as a standalone plugin (for development purposes), otherwise (when loaded as a library from within the LifterLMS core plugin) the localization strings are included into the LifterLMS Core plugin’s po/mo files and are localized by the LifterLMS core plugin.

Files can be found in the following order (The first loaded file takes priority):

  1. WP_LANG_DIR/lifterlms/lifterlms-blocks-LOCALE.mo
  2. WP_LANG_DIR/plugins/lifterlms-blocks-LOCALE.mo
  3. WP_CONTENT_DIR/plugins/lifterlms-blocks/i18n/lifterlms-blocks-LOCALE.mo

Note: The function load_plugin_textdomain() is not used because the same textdomain as the LifterLMS core is used for this plugin but the file is named lifterlms-blocks in order to allow using a separate language file for each codebase.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: libraries/lifterlms-blocks/includes/class-llms-blocks.php

	 *   3. WP_CONTENT_DIR/plugins/lifterlms-blocks/i18n/lifterlms-blocks-LOCALE.mo
	 *
	 * Note: The function `load_plugin_textdomain()` is not used because the same textdomain as the LifterLMS core
	 * is used for this plugin but the file is named `lifterlms-blocks` in order to allow using a separate language
	 * file for each codebase.
	 *
	 * @since 1.10.0
	 *
	 * @return void
	 */
	public function load_textdomain() {

		// load locale.
		$locale = apply_filters( 'plugin_locale', get_locale(), 'lifterlms' );



Top ↑

Changelog Changelog

Changelog
Version Description
1.10.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.