Translations final class
Minn\Runtime\Translations · public/minn/src/Minn/Runtime/Translations.php · 126 lines
The translations a request loads, as WordPress's l10n functions load them: the locale in force, a text domain loaded from its file (or its folder named for later) and unloaded, the default domain, a plugin's, a user's locale, and the translations installed on disk; each step with the filters that may answer first.
Public
| static | locale(): string# | The locale in force (determine_locale): a switched one, else pre_determine_locale, else the site's through determine_locale. |
| static | load(mixed $domain, mixed $mofile, mixed $locale = NULL): bool# | A text domain loaded from a translation file (load_textdomain), the PHP file beside the .mo first unless translation_file_format says mo; whether one loaded. Its locale becomes the one translations are looked up in, and its folder where its script translations are looked for. |
| static | unload(mixed $domain, mixed $reloadable = false): bool# | A text domain unloaded (unload_textdomain): whether it had files; one that did stays closed unless it may load again. |
| static | fromFolder(string $domain, string $folder, string $file, string $locale): bool# | A domain loaded from a folder's file for the locale when there is one, or the folder named for later; a domain closed for good loads nothing. |
| static | loadDefault(mixed $locale = NULL): bool# | The default domain loaded again for a locale, the one in force unless named (load_default_textdomain). |
| static | loadPlugin(mixed $domain, mixed $deprecated = false, mixed $relativePath = false): bool# | A plugin's domain loaded from its folder (load_plugin_textdomain), the plugins folder unless a path under it is given. |
| static | userLocale(mixed $user = 0): string# | A user's locale (get_user_locale), the signed-in user's for 0; the site's when the user has none or does not exist. |
| static | installed(mixed $type): array# | The translations installed (wp_get_installed_translations) for core, plugins or themes: by text domain and locale, each with its file's headers; a .po without its .mo is not one. @return array<string, array<string, array<string, string>>> |
Nothing matches.