Returns the languages directory path for a specific domain and locale.
$domainstringrequired
$localestringrequired
public function get( $domain, $locale ) {
$path = $this->all[ $domain ][ $locale ] ?? $this->get_path_from_lang_dir( $domain, $locale );
/**
* Filters the determined languages directory path for a specific domain and locale.
*
* @since 6.6.0
*
* @param string|false $path Languages directory path for the given domain and locale.
* @param string $domain Text domain.
* @param string $locale Locale.
*/
return apply_filters( 'lang_dir_for_domain', $path, $domain, $locale );
}
Filters the determined languages directory path for a specific domain and locale.
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_textdomain_registry/get