WordPress at a glance

is_textdomain_loaded() WP 1.0

Whether there are translations for the text domain.

✈ 1 time = 0.000027s = very fast | 50000 times = 0.01s = speed of light | PHP 7.1.5, WP 4.8.2

No Hooks.

Return

true/false. Whether there are translations.

Usage

is_textdomain_loaded( $domain );
$domain(string) (required)
Text domain. Unique identifier for retrieving translated strings.

Notes

  • Global. MO[]. $l10n

Changelog

Since 3.0.0 Introduced.

Code of is textdomain loaded: wp-includes/l10n.php WP 5.4.2

<?php
function is_textdomain_loaded( $domain ) {
	global $l10n;
	return isset( $l10n[ $domain ] );
}

Related Functions

From tag: textdomain (mo po files)

More from tag: localize (l10n i18n Internationalization localization)

More from tag: Conditional tags (all)

No comments
        Log In . Register