llms_restore_locale( string $textdomain = 'lifterlms', string $plugin_dir = null, string $language_dir = null )

Switch LifterLMS language to original.


Parameters Parameters

$textdomain

(string) (Optional) Text domain. Defaults to lifterlms.

Default value: 'lifterlms'

$plugin_dir

(string) (Optional) Plugin directory. Defaults to null.

Default value: null

$language_dir

(string) (Optional) Language directory. Defaults to null.

Default value: null


Top ↑

Source Source

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

function llms_restore_locale( $textdomain = 'lifterlms', $plugin_dir = null, $language_dir = null ) {
	global $wp_locale_switcher;

	if ( function_exists( 'restore_previous_locale' ) && isset( $wp_locale_switcher ) ) {
		restore_previous_locale();

		remove_filter( 'plugin_locale', 'get_locale' );

		llms_load_textdomain( $textdomain, $plugin_dir, $language_dir );
	}
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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