Pebble.Companion.Locale

Phone locale and regional preference helpers for companion apps.

init _ =
    ( model, Locale.current GotLocale )

subscriptions _ =
    Locale.onLocale GotLocale

Types

LocaleInfo

type alias LocaleInfo =
    { locale : String
    , language : String
    , region : String
    , uses24h : Bool
    }

Phone locale, language, region, and clock-format preferences.

Commands

current

current : (Result String LocaleInfo -> msg) -> Cmd msg

Request the current phone locale status.

setup

setup : Cmd msg

Register this platform handler with the companion bridge.

Subscriptions

onLocale

onLocale : (Result String LocaleInfo -> msg) -> Sub msg

Receive pushed locale status updates from the companion bridge.

Registering this subscription also tells the bridge to send locale updates.