Closed Kout95 closed 1 week ago
To translate we use lit-localize, which is a library that uses lit-element to handle translations. The translations are stored in the translations folder in the root of the project.
translations
To add a new translation you need to :
msg
npm run extract:translations
xliff/<your_language>.xlf
npm run build:translations
src/generated/locales/<your_language>.js
I add command :
npm run translations build
npm run build
frontend/localization/generated
frontend/xliff
npm run translations:extract
For the moment I only add "fr", and "en" is the default language
For crowdin, I identify this for .xlf files https://store.crowdin.com/xliff
.xlf
What
To translate we use lit-localize, which is a library that uses lit-element to handle translations. The translations are stored in the
translations
folder in the root of the project.To add a new translation you need to :
msg
in your code like this https://lit.dev/docs/localization/overview/#message-typesnpm run extract:translations
to extract the new translationsxliff/<your_language>.xlf
filesnpm run build:translations
to update the translations in thesrc/generated/locales/<your_language>.js
fileI add command :
npm run translations build
beforenpm run build
to be sure translations is generated infrontend/localization/generated
folderfrontend/xliff
is up to date with node commandnpm run translations:extract
For the moment I only add "fr", and "en" is the default language
For crowdin, I identify this for
.xlf
files https://store.crowdin.com/xliffPart of