Overview of petite-vue-i18n
masterpetite-vue-i18n is a lightweight, small-size subset of vue-i18n designed for projects that only require translation features. It is optimized for minimal bundle size by excluding DateTime formats, Number formats, and several utility APIs.
Key Differences from vue-i18n:
- Size: Significantly smaller (e.g., ~5.51KB vs ~10.12KB for runtime only in production/brotli).
- API Support: Only supports the Composition API. The legacy API is not supported.
- Features Excluded:
- DateTime and Number formatting (
n,$n,d,$d,rt,$rt,tm,$tm, and related setters/getters). - Custom directive
v-t. - Components:
i18n-t,i18n-d, andi18n-n.
- DateTime and Number formatting (
- Message Handling: Only supports simple key-value locale messages by default. Hierarchical messages require manual customization via the API.
- Fallback Logic: Uses the array order specified in
fallbackLocale.