Organizing fast translations for static websites with gulp and pug.
Use the package manager npm to install.
npm i
Fill in json data, where the key is the name of the translation folder.
[{
"ru": {
"lang": "ru lang",
"pretitle": "ru title"
},
"en": {
"lang": "en lang",
"pretitle": "en title"
}
}]
Insert fields from json into pug, if without a template engine, then translate html into pug and put fields.
p= lang
p= pretitle
gulp build
Folder will be created based on your json keys.