Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Add new language to existing generator

Francesco Guardiani edited this page Aug 18, 2017 · 2 revisions

Write the templates

First of all, locate where are templates of your generator. Then create a new directory with the name of your language.

Before start writing the templates, read the templates of other languages of the same generator. You can use these as start point.

Now you are ready to write templates. Follow the (http://handlebarsjs.com/) guide to start writing the templates and remember that you have all the power of Handlebars helpers library.

Add the language declaration to the generator

Now you are ready to declare the language inside the generator. Locate the languages metadata array (usually located inside main.js of the generator) and add the language metadata. Give a look at language metadata documentation to understand how to write a correct language metadata

Don't forget to add correct dependencies and right build tools