-
Notifications
You must be signed in to change notification settings - Fork 2
Customize translations
Benoit Orihuela edited this page Nov 10, 2019
·
1 revision
In package.json
file choose the instance for which you want to generate the translations.
To do so you have to replace the targetToCompile
variable with the directory name of your instance :
"lingui": {
...
"localeDir": "src/main/resources/public/locales/{targetToCompile}",
...
}
Then do a yarn compile
.
Do it for all if you need to have a multi domain site. Soon LinguiJs will integrate directly this kind of feature and this chore will be avoided.
yarn extract
will extract all tags or sentence present in the code as :
i18n._(t`somethingToTrad`)
<Trans>Something To trad</Trans>
Extracted translations will be present in the directory defined in the package.json
(cf: config & compilation).