How to enable translatation support after creating

2019-08-14 20:41发布

问题:

I created JHipsterApplication - at the time of the prompt "Would you like to enable translation support with Angular Translate? (Y/n)" - I provided "n". Now application is created and I want to add translation support to my application. Is there anyway to add translation support after the application is created or enable something which is disabled at the time of creating the application?

I tried "bower install angular translate" but it still says Translation is disabled for this project. Language can not be added". Thank you for your help.

回答1:

Edit the .yo-rc.json file in your project folder and re-generate your app using jhipster --with-entities, it will ask you for overwriting some files and maybe you'll have to merge some others.

Alternatively, after having edited the .yo-rc.json file, you could use also run the upgrade generator jhipster upgrade --force, it will handle your custom changes better.