hammerspoon2-docs
    Preparing search index...

    Namespace locale

    Retrieve information about the user's Language & Region settings, and respond to changes. Locales encapsulate linguistic, cultural, and technological conventions — things like the symbol used for a decimal separator, or the way dates and calendars are formatted.

    console.log("Current locale: " + hs.locale.current())
    const info = hs.locale.details()
    console.log("Uses metric: " + info.usesMetricSystem)
    hs.locale.on('change', () => {
    console.log("Locale settings changed: " + JSON.stringify(hs.locale.details()))
    })

    Functions

    availableLocales
    current
    details
    localizedName
    off
    on
    once
    preferredLanguages