Set the default string separator. Defaults to .
, as in
scope.translation
.
Set if engine should fallback to the default locale when a translation is
missing. Defaults to false
.
When enabled, missing translations will first be looked for in less
specific versions of the requested locale and if that fails by taking them
from your I18n#defaultLocale
.
Set the current locale. Defaults to en
.
Set missing translation behavior.
message
will display a message that the translation is missing.guess
will try to guess the string.error
will raise an exception whenever a translation is not defined.See register for instructions on how to define your own behavior.
Return a missing placeholder message for given parameters.
If you use missingBehavior with 'message', but want to know that the string is actually missing for testing purposes, you can prefix the guessed string by setting the value here. By default, no prefix is used.
Return a placeholder message for null values. Defaults to the same behavior
as I18n.missingPlaceholder
.
Set the placeholder format. Accepts {{placeholder}}
and %{placeholder}
.
Transform keys. By default, it returns the key as it is, but allows for overriding. For instance, you can set a function to receive the camelcase key, and convert it to snake case.
Generated using TypeDoc
Set default locale. This locale will be used when fallback is enabled and the translation doesn't exist in a particular locale. Defaults to
en
.