1.0.0 • Published 7 months ago
vite-plugin-html-inject-localize v1.0.0
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
1.0.0
7 months ago