Pebble.Companion.Locale
Phone locale and regional preference helpers for companion apps.
init _ =
( model, Locale.current GotLocale )
subscriptions _ =
Locale.onLocale GotLocaleTypes
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 msgRequest the current phone locale status.
setup
setup : Cmd msgRegister this platform handler with the companion bridge.
Subscriptions
onLocale
onLocale : (Result String LocaleInfo -> msg) -> Sub msgReceive pushed locale status updates from the companion bridge.
Registering this subscription also tells the bridge to send locale updates.