vue3-gettext
Translate Vue 3 applications with gettext
865,515
86
| Install | |
|---|---|
npm install vue3-gettext |
|
| Latest Version: | 4.0.1 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Jun 16, 2026 |
| Links: | GitHub · npm |
Maintainer: lzurbriggen
Vue 3 Gettext 💬
Translate Vue 3 applications with gettext.
Getting started | Demo | Documentation | 中文
Basic usage
In templates:
<span>
{{ $gettext("I'm %{age} years old!", { age: 32 }) }}
</span>
In code:
const { $gettext } = useGettext();
console.log($gettext("Hello World!"));
Features
- 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
Contribute
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.
Credits
This plugin relies heavily on the work of the original vue-gettext.
License
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 4.0.1 | >=3.0.0 | MIT | |
| 4.0.0 | >=3.0.0 | MIT | |
| 2.4.0 | >=3.0.0 | MIT | |
| 2.3.4 | >=3.0.0 | MIT | |
| 2.3.3 | >=3.0.0 | MIT | |
| 2.3.2 | >=3.0.0 | MIT | |
| 2.3.1 | >=3.0.0 | MIT | |
| 2.3.0 | >=3.0.0 | MIT | |
| 2.2.3 | >=3.0.0 | MIT | |
| 2.2.2 | >=3.0.0 | MIT | |
| 2.2.1 | >= 3.0.0 | MIT | |
| 2.2.0 | >= 3.0.0 | MIT | |
| 2.1.0 | >= 3.0.0 | MIT | |
| 2.0.0 | >= 3.0.0 | MIT |
Pre-releases (24)
| Version | Released | Vue | License |
|---|---|---|---|
| 4.0.0-beta.1 | >=3.0.0 | MIT | |
| 4.0.0-alpha.8 | >=3.0.0 | MIT | |
| 4.0.0-alpha.7 | >=3.0.0 | MIT | |
| 4.0.0-alpha.6 | >=3.0.0 | MIT | |
| 4.0.0-alpha.5 | >=3.0.0 | MIT | |
| 4.0.0-alpha.4 | >=3.0.0 | MIT | |
| 4.0.0-alpha.3 | >=3.0.0 | MIT | |
| 4.0.0-alpha.2 | >=3.0.0 | MIT | |
| 4.0.0-alpha.1 | >=3.0.0 | MIT | |
| 3.0.0-beta.6 | >=3.0.0 | MIT | |
| 3.0.0-beta.5 | >=3.0.0 | MIT | |
| 3.0.0-beta.4 | >=3.0.0 | MIT | |
| 3.0.0-beta.3 | >=3.0.0 | MIT | |
| 3.0.0-beta.2 | >=3.0.0 | MIT | |
| 3.0.0-beta.1 | >=3.0.0 | MIT | |
| 3.0.0-alpha.1 | >=3.0.0 | MIT | |
| 2.5.0-alpha.1 | >=3.0.0 | MIT | |
| 2.2.2-beta.1 | >=3.0.0 | MIT | |
| 2.2.0-alpha.1 | >= 3.0.0 | MIT | |
| 2.0.0-beta.2 | >= 3.0.0 | MIT | |
| 2.0.0-beta.1 | >= 3.0.0 | MIT | |
| 2.0.0-alpha.3 | >= 3.0.0 | MIT | |
| 2.0.0-alpha.2 | >= 3.0.0 | MIT | |
| 2.0.0-alpha.1 | >= 3.0.0 | MIT |