parcel-transformer-localize

0.1.0 • Public • Published

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

Package Sidebar

Install

npm i parcel-transformer-localize

Weekly Downloads

1

Version

0.1.0

License

MPL-2.0

Unpacked Size

9.02 kB

Total Files

6

Last publish

Collaborators

  • mkg20001