vite-plugin-html-inject-localize
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Fork from https://github.com/donnikitos/vite-plugin-html-inject with added localization option.

How to use for localization:

  1. Add locale.json to project (to roote folder, for example).
    {
    	"title": "Localization title text",
    }
    
  2. Load locale.json to html file: <load ="./locale.json" />
  3. Use keys from locale.json in html: <p>{=$title}</p>
  4. Result will be: <p>Localization title text</p>

You can use different locale.json files in different folders: - en - es - ru - etc

Package Sidebar

Install

npm i vite-plugin-html-inject-localize

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

9.05 kB

Total Files

6

Last publish

Collaborators

  • dmitriinazimov