hammerspoon2-docs
    Preparing search index...

    Function details

    • Returns detailed information about the current or a specified locale.

      Parameters

      • Optionalidentifier: string | null

        A locale identifier from availableLocales(). If omitted, the user's currently selected locale is used.

      Returns {
          alternateQuotationBeginDelimiter?: string;
          alternateQuotationEndDelimiter?: string;
          calendar: {
              amSymbol: string;
              eraSymbols: string[];
              firstWeekday: number;
              identifier: string;
              longEraSymbols: string[];
              minimumDaysInFirstWeek: number;
              monthSymbols: string[];
              pmSymbol: string;
              quarterSymbols: string[];
              shortMonthSymbols: string[];
              shortQuarterSymbols: string[];
              shortStandaloneMonthSymbols: string[];
              shortStandaloneQuarterSymbols: string[];
              shortStandaloneWeekdaySymbols: string[];
              shortWeekdaySymbols: string[];
              standaloneMonthSymbols: string[];
              standaloneQuarterSymbols: string[];
              standaloneWeekdaySymbols: string[];
              veryShortMonthSymbols: string[];
              veryShortStandaloneMonthSymbols: string[];
              veryShortStandaloneWeekdaySymbols: string[];
              veryShortWeekdaySymbols: string[];
              weekdaySymbols: string[];
          };
          collationIdentifier: string;
          countryCode?: string;
          currencyCode?: string;
          currencySymbol?: string;
          decimalSeparator?: string;
          groupingSeparator?: string;
          identifier: string;
          languageCode?: string;
          measurementSystem: "metric"
          | "us"
          | "uk";
          quotationBeginDelimiter?: string;
          quotationEndDelimiter?: string;
          scriptCode?: string;
          temperatureUnit?: string;
          timeFormatIs24Hour: boolean;
          usesMetricSystem: boolean;
          variantCode?: string;
      }

      An object describing the locale. The optional fields are present only where the locale has them

      • OptionalalternateQuotationBeginDelimiter?: string
      • OptionalalternateQuotationEndDelimiter?: string
      • calendar: {
            amSymbol: string;
            eraSymbols: string[];
            firstWeekday: number;
            identifier: string;
            longEraSymbols: string[];
            minimumDaysInFirstWeek: number;
            monthSymbols: string[];
            pmSymbol: string;
            quarterSymbols: string[];
            shortMonthSymbols: string[];
            shortQuarterSymbols: string[];
            shortStandaloneMonthSymbols: string[];
            shortStandaloneQuarterSymbols: string[];
            shortStandaloneWeekdaySymbols: string[];
            shortWeekdaySymbols: string[];
            standaloneMonthSymbols: string[];
            standaloneQuarterSymbols: string[];
            standaloneWeekdaySymbols: string[];
            veryShortMonthSymbols: string[];
            veryShortStandaloneMonthSymbols: string[];
            veryShortStandaloneWeekdaySymbols: string[];
            veryShortWeekdaySymbols: string[];
            weekdaySymbols: string[];
        }

        The locale's calendar

        • amSymbol: string
        • eraSymbols: string[]
        • firstWeekday: number

          The first day of the week, where 1 is Sunday

        • identifier: string

          e.g. "gregorian"

        • longEraSymbols: string[]
        • minimumDaysInFirstWeek: number
        • monthSymbols: string[]
        • pmSymbol: string
        • quarterSymbols: string[]
        • shortMonthSymbols: string[]
        • shortQuarterSymbols: string[]
        • shortStandaloneMonthSymbols: string[]
        • shortStandaloneQuarterSymbols: string[]
        • shortStandaloneWeekdaySymbols: string[]
        • shortWeekdaySymbols: string[]
        • standaloneMonthSymbols: string[]
        • standaloneQuarterSymbols: string[]
        • standaloneWeekdaySymbols: string[]
        • veryShortMonthSymbols: string[]
        • veryShortStandaloneMonthSymbols: string[]
        • veryShortStandaloneWeekdaySymbols: string[]
        • veryShortWeekdaySymbols: string[]
        • weekdaySymbols: string[]
      • collationIdentifier: string
      • OptionalcountryCode?: string

        e.g. "CH"

      • OptionalcurrencyCode?: string

        e.g. "CHF"

      • OptionalcurrencySymbol?: string
      • OptionaldecimalSeparator?: string
      • OptionalgroupingSeparator?: string
      • identifier: string

        The locale's identifier, e.g. "de_CH"

      • OptionallanguageCode?: string

        e.g. "de"

      • measurementSystem: "metric" | "us" | "uk"
      • OptionalquotationBeginDelimiter?: string
      • OptionalquotationEndDelimiter?: string
      • OptionalscriptCode?: string

        e.g. "Latn"

      • OptionaltemperatureUnit?: string

        e.g. "Celsius"

      • timeFormatIs24Hour: boolean
      • usesMetricSystem: boolean
      • OptionalvariantCode?: string