Giter Site home page Giter Site logo

theglenn88 / vue3-gettext Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jshmrtn/vue3-gettext

0.0 0.0 0.0 1.24 MB

Translate Vue 3 applications with gettext.

Home Page: https://jshmrtn.github.io/vue3-gettext/

License: MIT License

JavaScript 1.03% TypeScript 89.95% CSS 0.06% HTML 0.28% Vue 8.69%

vue3-gettext's Introduction


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

vue3-gettext's People

Contributors

lzurbriggen avatar olof-nord avatar theglenn88 avatar cpontvieux-systra avatar youthlin avatar tcitworld avatar fedorsherbakov avatar 0xjacky avatar jeremyzahner avatar lesuisse avatar win0err avatar itechmeat avatar tabun-matadorov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.