Skip to content
On this page

What is VIntl

VIntl is a plugin for Vue that attempts to tightly integrate the FormatJS Intl library into Vue applications, with lots of sweet stuff like real-time locale loading and switching, helper functions, mixins, and much more.


DISCLAIMER

This documentation is still work in progress and will continue to improve in the future.

You can help make it better by contributing on GitHub →

Comparison with Vue Intl

The official Vue Intl plugin from the FormatJS team already provides a way to add Intl to your Vue applications, but its scope is to just bring the Intl and nothing else.

This plugin has a much broader scope — not only to provide Intl, but also to allow it to be managed during runtime.

Featurevue-intlvintl
Access Intl globallyYes✅ Yes
Helper functionsYes✅ Yes
ComposablesYes✅ Yes
Changing language in runtime👎 Not supported✅ Supported
Loading languages☑ Out of scope✅ Supported
Events☑ Out of scope✅ Yes
Formatting component🤔 Maybe comes in the future✅ Supported
Translations extraction✅ Using @formatjs/cli✅ Using @formatjs/cli
No parser mode✅ Supported✅ Supported
TypeScript extensibility👍 Some✅ Enhanced
Nuxt integration☑ Manual👀 Coming soon™

NOTE

This comparison table is not meant to be taken as ‘this project is better’: it's perfectly fine for FormatJS to set the scope of their project and how much they want to commit to it! It's here merely meant to show the differences in scope between the two projects.

Comparison with Vue I18n

Vue I18n is a much more mature and popular framework for Vue that has been around for a while. It's usually a good choice for people who want stability and familiarity.

There are certain things you may not like in Vue I18n, such as a custom interpolation syntax instead of standard syntax like Fluent or ICU MessageFormat, or a slightly more complicated and manual API — it does not try to do things for you, which can be its advantage.

There's not much to compare! Vue I18n has almost everything the VIntl has and more. It's all about choice: VIntl tries to bring FormatJS Intl into the Vue world, Vue I18n does things its own way and does it nicely.

Released under the MIT Licence.