Locale APIs
In addition to useI18n(), the Vue SDK exports lower-level locale primitives for advanced integrations:
localelocaleSettingsetLocale()AVAILABLE_LOCALESLOCALE_LABELS
Use these when you want direct store access, need to integrate locale state with a larger app shell, or want locale metadata without subscribing to the full useI18n() return object.
Usage
ts
import {
locale,
localeSetting,
setLocale,
AVAILABLE_LOCALES,
LOCALE_LABELS,
} from '@open-pencil/vue'Notes
localeis the resolved active locale storelocaleSettingis the persisted user preference storesetLocale()updates the preference and active locale togetherAVAILABLE_LOCALESandLOCALE_LABELSare useful for custom pickers