is_textdomain_loaded( string $domain )
Whether there are translations for the text domain.
Parameters Parameters
- $domain
-
(string) (Required) Text domain. Unique identifier for retrieving translated strings.
Return Return
(bool) Whether there are translations.
Source Source
File: wp-includes/l10n.php
function is_textdomain_loaded( $domain ) { global $l10n; return isset( $l10n[ $domain ] ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
There are situations where one requires a plugin translation locale to be loaded which is different from the current user locale.
For example, in multilingual websites, creating a translation of a post/widget requires some translations to be loaded for a given plugin text domain. The user locale (dashboard locale) is loaded by default, so it is important to unload that if it has been loaded already and seek the translation file to load for the text domain for the requested locale,