AI-native design editor. Open-source Figma alternative.
title: Locale APIs description: Lower-level locale stores and metadata exported by @open-pencil/vue.
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
import { locale, localeSetting, setLocale, AVAILABLE_LOCALES, LOCALE_LABELS } from '@open-pencil/vue/i18n'
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