DownloadI18Next\Translator
Properties
$locales
private \I18Next\Locale[] $locales = []
$language
private string $language
$fallback
private string $fallback
$translations_path
private string $translations_path
$loader_format
private string $loader_format = json
$namespace_priority
private string[] $namespace_priority = []
$use_filename_as_namespace
private bool $use_filename_as_namespace = false
Methods
setTranslationsPath
mixed I18Next\Translator::setTranslationsPath(string path)
Set the root path of locales folder.
Arguments
setNamespacePriority
mixed I18Next\Translator::setNamespacePriority(mixed namespace_priority)
Set namespace priority.
Arguments
useFilenameAsNamespace
mixed I18Next\Translator::useFilenameAsNamespace(bool|null enabled)
Set if filenames will be used as namespaces.
Arguments
setLanguagePrimary
mixed I18Next\Translator::setLanguagePrimary(string language_code)
Set Primary Language.
Arguments
addLanguage
mixed I18Next\Translator::addLanguage(string code)
Add Extra languages.
Arguments
setLanguageFallback
mixed I18Next\Translator::setLanguageFallback(string fallback_code)
Set fallback language.
Arguments
_
string I18Next\TranslatorInterface::_(string key, array|null parameters, string|null context, string|null locale)
Translates the given message.
Arguments
-
key string
-
parameters array|null - <p>Array of parameters used to translate message</p>
-
context string|null - <p>The context of the request</p>
-
locale string|null - <p>The locale or null to use the default</p>
getLocale
mixed I18Next\Translator::getLocale(string locale)
Arguments
|