Translations
No summary available
import { Translations } from "@schukai/monster/source/i18n/translations.mjs";Exported
Translations, getDocumentTranslationsDerived from
BaseOptions
The Options listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits Options from these parent classes. If you cannot find a specific Options in this list, we recommend consulting the documentation of the Base.
Properties
The Properties listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits Properties from these parent classes. If you cannot find a specific Properties in this list, we recommend consulting the documentation of the Base.
Methods
The methods listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits methods from these parent classes. If you cannot find a specific method in this list, we recommend consulting the documentation of the Base.
Constructor
constructor(locale)locale{locale}: locale
Structural methods
getPluralRuleText(key,count,defaultText)key{string}: keycount{integer|string}: countdefaultText{string|undefined}: defaultText
- {string}
count can be passed to this method. In addition to a number, one of the keywords can also be passed directly. "zero", "one", "two", "few", "many" and "other". Remember: not every language has all rules. The appropriate text for this number is then selected. If no suitable key is found, defaultText is taken.getText(key,defaultText)key{string}: keydefaultText{string|undefined}: defaultText
- {string}
{Error}key not found
defaultText is taken.setText(key,text)key{string}: keytext{string|object}: text
- {Translations}
{TypeError}value is not a string or object
translations.setText("text1", "Make my day!"); // plural rules translations.setText("text6", { "zero": "There are no files on Disk.", "one": "There is one file on Disk.", "other": "There are files on Disk." "default": "There are files on Disk." });``Static methods
[instanceSymbol]()3.27.0- {symbol}
instanceof operator.Other methods
assignTranslations(translations)translations{object}: translations
- {Translations}
translations.assignTranslations({ "text1": "Make my day!", "text2": "I'll be back!", "text6": { "zero": "There are no files on Disk.", "one": "There is one file on Disk.", "other": "There are files on Disk." "default": "There are files on Disk." });``Events
This component does not fire any public events. It may fire events that are inherited from its parent classes.