vite-plugin-html-inject-localize
v1.0.0
Published
Split your index.html into multiple files and inject them where ever you want! And add localize, if you want.
Downloads
5
Maintainers
Readme
Fork from https://github.com/donnikitos/vite-plugin-html-inject with added localization option.
How to use for localization:
- Add locale.json to project (to roote folder, for example).
{ "title": "Localization title text", }
- Load locale.json to html file:
<load ="./locale.json" />
- Use keys from locale.json in html:
<p>{=$title}</p>
- Result will be:
<p>Localization title text</p>
You can use different locale.json files in different folders: - en - es - ru - etc