i18n-page-texts
v1.0.3
Published
Generate or feed missed translated properties of each json file for each locale you provided. Besides, it will generate an interface for Typescript.
Readme
Goal
As the conept depicted in this scratch,
[]
,as a developer, I hope that:
Once I add some new sentences into my App, I hope that I can embed those new sentences for all the other languages by google translate Api just by one command such as
npm run i18n.If there are some properties such as
addressthat I don't want to be translated, I can easily achieve this goal by declaring it in the config file.In ionic or Angular, I can use the intellisence to speed up my coding for these sentences.
If I want to embed the sentences for a new language, I just need to add a new subfolder named as its isoCode shown in
node_modules/google-translate-api/languages.jsand run the commandnpm run i18n.
Well, it can be.
Usage
i18n-page-texts --initwill generate a config file.
i18n-page-textsor
i18n-page-texts --config [SOME FILE].jsonwill generate files IPageTexts.ts, pageTexts.js and a pageTexts.json for each sub-folder in i18n folder.
These files' name can be redefined in the [SOME FILE].json.
i18n-page-texts --helpwill show the help information.
