This API is used for the localization methods.

Accessed from the window at window.sas.vi.localization.

window.sas.vi.localization.getLocale();
interface LocalizationApi {
    solution: SolutionLocalizationApi;
    getDirection(): "ltr" | "rtl";
    getFormatLocale(): string;
    getLocale(): string;
    getLocalizedDateTimeFormat(showTime?: boolean): string;
}

Properties

Methods related to solution content localization.

Methods

  • Returns "ltr" | "rtl"

    The current application display direction.

    Gets the application display direction. This is either "ltr" for left-to-right display locales, or "rtl" for right-to-left locales.

  • Returns string

    The user's preferred locale format.

    Gets user's preferred locale format in BCP 47 format. This should be used to format dates\numbers in VI extensions but not to drive the language.

  • Returns string

    The current application locale.

    Gets the application locale in BCP 47 format.

  • Parameters

    • OptionalshowTime: boolean

      {boolean} Checks whether or not to include time (in 12 hour format).

    Returns string

    The localized date time format as a string.

    Returns the MomentJS format string based on locale.