html-internationalization-boilerplate
Generating static internationalization html automatically
Requirements
Usages
- Git clone this repo
- Open terminal and
cd
to the directory - Install dependencies by runing
yarn install
ornpm install
- Compile views by runing
yarn build
ornpm run build
After run the script, the output html files are in dist
directory.
Directories
- views: HTML templates (using: posthtml-expressions)
- locals: Local language json files
- dist: Output directory of HTML
Adding a XXX Language
- Add a
XXX.json
file intolocals
dir - Add a new script
"build:XXX": "cross-env APP_LANG=XXX parcel build views/**/*.html --out-dir=dist/XXX",
inpackage.json
file - Run
yarn build
ornpm run build
, and checkoutdist/XXX
directory
License
MIT