A VSCode exetension for umi project that easily extract i18n materials with just a click.
Init with basic files needed for formatjs to extract materials.
It mainly do 5 things
- create folder
/locales
- create country folders under
/locaes
folder, like/en-US
,/id-ID
,/th-TH
and/vi-VN
- create formater file
TMS.js
andindex.json
file under each country folder - create TS export file under
/locales
folder, likeen-US.ts
,id-ID.ts
,th-TH.ts
andvi-VN.ts
- add '@formatjs/cli' to package.json
- run
yarn install
Extract materials from the source code.
It runsnpx formatjs extracat
for all 4 locales.
UMI project written by Typescript
umi-formatjs.includeFolders
: The folders that formatjs/cli want to extract from, defaut value issrc
. If you want to specific multiple foleders, concat them with,
umi-formatjs.countries
: The countries that formatjs want to support, defaut value isen-US,id-ID,th-TH,vi-VN
. If you want to specific more countries, concat them with,