# Function getMessages

- getMessages(
  locale:
  | "es"
  | "id"
  | "is"
  | "no"
  | "ar"
  | "bg"
  | "bn-IN"
  | "cs"
  | "da"
  | "de"
  | "el"
  | "en-GB"
  | "en-US"
  | "es-ES"
  | "fi"
  | "fr-CA"
  | "fr"
  | "ga"
  | "hi-IN"
  | "hr"
  | "hu"
  | "it"
  | "iw"
  | "ja"
  | "ko"
  | "lo"
  | "lt"
  | "ms"
  | "nl"
  | "nl-BE"
  | "pl"
  | "pt-BR"
  | "pt"
  | "ro"
  | "ru"
  | "sk"
  | "sl"
  | "sr"
  | "sv"
  | "sw"
  | "uk"
  | "ur"
  | "vi"
  | "th"
  | "tr"
  | "zh-HK"
  | "zh"
  | "zu",
  programThemeMessages?: ProgramThemeMessages,
  segment?: Segment,
  ): Promise<StringMap>

  #### Parameters

  - locale:
    | "es"
    | "id"
    | "is"
    | "no"
    | "ar"
    | "bg"
    | "bn-IN"
    | "cs"
    | "da"
    | "de"
    | "el"
    | "en-GB"
    | "en-US"
    | "es-ES"
    | "fi"
    | "fr-CA"
    | "fr"
    | "ga"
    | "hi-IN"
    | "hr"
    | "hu"
    | "it"
    | "iw"
    | "ja"
    | "ko"
    | "lo"
    | "lt"
    | "ms"
    | "nl"
    | "nl-BE"
    | "pl"
    | "pt-BR"
    | "pt"
    | "ro"
    | "ru"
    | "sk"
    | "sl"
    | "sr"
    | "sv"
    | "sw"
    | "uk"
    | "ur"
    | "vi"
    | "th"
    | "tr"
    | "zh-HK"
    | "zh"
    | "zu"
  - `Optional` programThemeMessages: ProgramThemeMessages
  - `Optional` segment: Segment

  #### Returns Promise<StringMap>

  #### Description

  Get all messages for a given locale. Return a flattened messages object, where properties are dot-string style.

  - Defined in jslib/src/lib/intl/intl.ts:330