Translate Vue 3 applications with gettext
npm install vue3-gettextTranslate Vue 3 applications with gettext.
Getting started | Demo | Documentation | 䏿–‡
In templates:
``jsx`
{{ $gettext("I'm %{age} years old!", { age: 32 }) }}
In code:
`ts
const { $gettext } = useGettext();
console.log($gettext("Hello World!"));
`
- simple, ergonomic API
- reactive translations in Vue templates and TypeScript/JavaScript code
- CLI to automatically extract messages from code files
- support for pluralization and message contexts
Please make sure your code is properly formatted (the project contains a prettier config) and all the tests run successfully (npm run test) when opening a pull request.
Please specify clearly what you changed and why.
This plugin relies heavily on the work of the original vue-gettext`.