API / Minn\I18n / TranslationFiles

TranslationFiles final class

Minn\I18n\TranslationFiles · public/minn/src/Minn/I18n/TranslationFiles.php · 48 lines

Which file a request for a .mo path reads, and reading it. Asked for "x.mo", the reference reads "x.l10n.php" when the format is php and that file is there, and the .mo only otherwise; asked for the mo format, only the .mo.

Public

staticcandidates(string $mofile, string $format): array#

The files to try for a requested .mo path, in order.

@return list<string>
staticlanguages(string $dir, ?string $asked = NULL): array#

The languages a folder holds core translations for (each .mo but the time zone names, the network admin's and the admin's), as get_available_languages lists them, through its filter ($asked: the folder as the caller named it, null for the site's own).

@return list<string>
staticread(string $file): ?Minn\I18n\Catalog#

A translation file's catalog by its extension, or null when it cannot be read as one.