Skip to content

AI-native design editor. Open-source Figma alternative.

937 B
Raw Blame

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:

  • locale
  • localeSetting
  • setLocale()
  • AVAILABLE_LOCALES
  • LOCALE_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

  • locale is the resolved active locale store
  • localeSetting is the persisted user preference store
  • setLocale() updates the preference and active locale together
  • AVAILABLE_LOCALES and LOCALE_LABELS are useful for custom pickers

Related APIs