GitHub - fluent-vue/fluent-vue: Internationalization plugin for Vue.js (original) (raw)
Internationalization plugin for Vue.js
fluent-vue
is a Vue.js integration for Fluent.js - JavaScript implementation of Mozilla's Project Fluent
🚀 Features
- Simple api for developers: Just 2 methods, 1 directive and 1 component
- Powerfull syntax for translators: Use the entire expressive power of every language without need for changes to application source code
- Isolation: Locale-specific logic doesn't leak to other locales. A simple string in English can map to a complex multi-variant translation in another language
- Seamless migration: Works for both Vue 3 and 2
- No bundler required: Usable via CDN
🎉 Example
{{ $t('hello-user', { userName }) }}
{{ $t('shared-photos', { userName, photoCount, userGender }) }}
Complex things are possible.
shared-photos = {$userName} {$photoCount -> [one] added one photo *[other] added {$photoCount} new photos } to {$userGender -> [male] his stream [female] her stream *[other] their stream }.
📖 Documentation
Documentation can be found here: https://fluent-vue.demivan.me
Examples for different Vue.js versions and build systems can be found here.
📜 Changelog
Changes for each release are documented in the CHANGELOG.md.
📦 Packages
Project | NPM | Repo |
---|---|---|
fluent-vue | fluent-vue/fluent-vue | |
unplugin-fluent-vue | fluent-vue/unplugin-fluent-vue |
📄 License
MIT License © 2020 Ivan Demchuk