Returns whether the locale uses an RTL (right to left) language.
Returns the translations for this locale. The translations are stored
within a YAML file for each locale, in a file named
/locales/{locale}.yaml
. The translations are stored as a mapping of
source string to translation, under a translations
key within the file.
Records a missing translation string during the build process. If the
build looks up a translation for a source string and if the translation
doesn't exist, it is recorded by this function so that all missing
translations can be collected (and translated) later. The location of the
translation string (the Document
where the missing translation string was
located, is also collected, so that the order of appearance and the context
can be bundled with the recorded strings and provided to translators.
The source string that is missing a translation.
The document where the string was requested.
Normalizes a string into a TranslationString
object.
Generated using TypeDoc
Locales provide pods with a way of generating different content for different locales. Locale objects are used to instantiate documents, so that one document can be available in many locales – and documents, collections, and pods can each have their own sets of locales.
Locale objects provide a way with accessing the translations for a locale, as well as managing operations around the translation process such as recording strings that are missing translations. Locale objects also provide information about the locale that can be used within templates, such as whether the locale is a right-to-left locale.