🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

vue3-gettext

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
v

vue3-gettext

Translate Vue 3 applications with gettext

4.0.0-alpha.8
next
latest
87

Supply Chain Security

100

Vulnerability

86

Quality

83

Maintenance

100

License

Version published
Weekly downloads
12K
16.2%
Maintainers
0
Weekly downloads
 
Created
Issues
16

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

MIT

FAQs

Package last updated on 30 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts