https://github.com/cap32/html-internationalization-boilerplate
Generating static internationalization html automatically
https://github.com/cap32/html-internationalization-boilerplate
Last synced: about 1 month ago
JSON representation
Generating static internationalization html automatically
- Host: GitHub
- URL: https://github.com/cap32/html-internationalization-boilerplate
- Owner: Cap32
- Created: 2020-12-28T17:39:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-28T17:40:50.000Z (over 5 years ago)
- Last Synced: 2025-03-22T14:26:16.231Z (about 1 year ago)
- Language: HTML
- Size: 67.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# html-internationalization-boilerplate
Generating static internationalization html automatically
## Requirements
- [node.js](http://nodejs.org/)
- [yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/)
- Git
## Usages
1. Git clone this repo
2. Open terminal and `cd` to the directory
3. Install dependencies by runing `yarn install` or `npm install`
4. Compile views by runing `yarn build` or `npm run build`
After run the script, the output html files are in `dist` directory.
## Directories
- **views**: HTML templates (using: [posthtml-expressions](https://github.com/posthtml/posthtml-expressions#options))
- **locals**: Local language json files
- **dist**: Output directory of HTML
## Adding a XXX Language
1. Add a `XXX.json` file into `locals` dir
2. Add a new script `"build:XXX": "cross-env APP_LANG=XXX parcel build views/**/*.html --out-dir=dist/XXX",` in `package.json` file
3. Run `yarn build` or `npm run build`, and checkout `dist/XXX` directory
## License
MIT