@dgknca/gulp-i18n-pug

Gulp plugin to compile Pug templates with internationalization support based on JS/JSON/YAML files

Usage no npm install needed!

<script type="module">
  import dgkncaGulpI18nPug from 'https://cdn.skypack.dev/@dgknca/gulp-i18n-pug';
</script>

README

@dgknca/gulp-i18n-pug

Exactly same with gulp-i18n-pug

But there are an extra parameter called defaultLang. If you set defaultLang, the generated HTML files will look like this:

html/
├── tr/
│   └── index.html
├── index.html (english)

instead of

html/
├── tr/
│   └── index.html
└── en/
    └── index.html

How to use

...
i18n: {
  dest: 'public',
  locales: 'src/lang/*.*',
  defaultLang: 'en' // <---
},
...