llms_get_locale( string $domain = 'lifterlms' )

Retrieve the current plugin locale.


Parameters Parameters

$domain

(string) (Optional) Text domain.

Default value: 'lifterlms'


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/functions/llms-functions-l10n.php

function llms_get_locale( $domain = 'lifterlms' ) {

	if ( function_exists( 'determine_locale' ) ) {
		$locale = determine_locale();
	} else {
		// @TODO: This can be removed when minimum supported version is 5.0.
		$locale = is_admin() ? get_user_locale() : get_locale();
	}

	/**
	 * Filter the plugin's locale
	 *
	 * @since Unknown
	 *
	 * @link https://developer.wordpress.org/reference/hooks/plugin_locale/
	 *
	 * @param string $locale The plugin's current locale.
	 * @param string $domain The textdomain.
	 */
	return apply_filters( 'plugin_locale', $locale, $domain );

}


Top ↑

Changelog Changelog

Changelog
Version Description
4.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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