Staticasyncutil/AsyncLoad.js must be loaded via import() to avoid cyclical imports that would cause a ReferenceError for Locale.
StaticcurrentThe current locale
Protected StaticdataThe localized message strings, per component and locale, with the default message for localeError() below.
StaticdefaultThe default locale for when a message has no current localization
StaticinitializedWhether setLocale() has been called or not.
StaticisTrue when the core component has been loaded (and so the Package path resolution is available)
Protected StaticlocationsThe locale files to load for each locale (as registered by the components)
Protected StaticgetLoad a localization file and register its contents
The component whose localization is being loaded
The locale being loaded
The file to load for that localization
A promise that resolves when the file is loaded and registered
Protected StaticlocaleReport an error thrown when loading a component's locale file, and fall back to loading the default locale if the failed locale was not the default.
The component whose localization is being loaded
The locale being loaded
The Error object causing the issue
A promise for loading the default locale, or void
StaticlookupFind a localized message string, or use the default if not available
The component for this message
The id of the message
The message string to use
StaticmessageGet a message string and insert any arguments. The arguments can be positional, or a mapping of names to values. E.g.
Locale.message('[my]/test', 'Hello', {name: 'World'})); Locale.message('[my]/test', 'FooBar', 'Foo'));
The component whose message is requested
The id of the message
The first argument or the object of names arguments
Any additional string arguments (if data is a string)
The localized message with arguments substituted in
StaticprocessProcess a message string by substituting the given arguments. The arguments can be positional, or a data mapping of names to values.
The message string to process.
The first argument or the object of names arguments
Additional arguments (if data is a string)
The processed message string with arguments substituted
StaticregisterRegisters a given component's locale directory
The component's name (e.g., [tex]/bbox)
The directory where the locales are located
StaticregisterRegister a set of messages for a given component and locale (called when the localization files are loaded).
The component's name (e.g., [tex]/bbox)
The locale for the messages
The messages indexed by their IDs
StaticsetSet the locale to the given one (or use the current one), and load any needed files (or newly registered files for the current locale).
The local to use (or use the current one)
A promise that resolves when the locale files have been loaded
Protected StaticsubstituteSubstitue arguments into a message string
The original message string
The mapping of markers to values
The final string with substitutions made
StaticthrowThrow an error with a given string substituting the given parameters
The component whose message is requested
The id of the message
The first argument or the object of names arguments
Any additional string arguments (if data is a string)
StaticwarnReport a warning with a given string substituting the given parameters
The component whose message is requested
The id of the message
The first argument or the object of named arguments
Any additional string arguments (if data is a string)
The Locale class for handling localized messages