The Open Innovation MOOCs is a biligual Application supporting translation in English and Arabic.
Tools and technologies
Set up for Internalization
- LinguiJs is installed and set up according to the guide in the documentation.
- The
i18n.tsfile loads the locales based on language selection. linguricfor lingui configuration.- The
Transandtmodules are imported from "@lingui/macro" for text translation. Example:<Trans>Join us now!</Trans> - Run
yarn extractto extract the English content to theen.jsonfile
Using Crowdin for translation
- The Github respository is integrated into crowdin to monitor changes made to the locale file.
- The English file can be translated using the crowdin
Editoror usingMT Translation - The translated changes are added to the
ar.jsonfile and Github creates a Pull Request to merge the changes
Compilation
- The updated file is compile using
yarn compileto load the added Arabic files.