Docs (4.0.0)
interface I18nProvider method

getAttributes

A method that returns information about the locale represented by this provider.

getAttributes(): Readonly<I18nProvider.Attributes>

Summary

This method must be implemented to provide information about the locale, such as the locale identifier (mandatory), text direction (only true if right-to-left), and decimal separator. The decimal separator defaults to . if not provided.

Example

// Part of an I18nProvider implementation:
getAttributes(): I18nProvider.Attributes {
  return {
    locale: "en-US",
    rtl: false,
    decimalSeparator: ".",
  };
}

Related