0.1.0 • Published 6 years ago
parcel-transformer-localize v0.1.0
parcel-transformer-localize
Localize your static pages, quick and simple
Usage
Add parcel-transformer-localize as a transformer for parcel by adding this to your package.json
{
  "parcel": {
    "transforms": {
      "*.html": [
        "parcel-transformer-localize"
      ]
    }
  }
}What it does
Basically it takes HTML snippets like these
<translate>
  <p>Hello <b>World</b></p>
</translate>Converts them into translateable strings like those Hello %1World%2
And creates a translation file at the specified path
Creating translation files
Translation files are created automatically
In order to add a new language, simply add an empty file named LANGUAGE.json, it will be filled automatically