-
Notifications
You must be signed in to change notification settings - Fork 1
Localisation
DMIS makes use of Angular 4's internationalisation tools.
Example:
<h1 i18n="An introduction header for this sample@@introductionHeader">Hello i18n!</h1>
Provide a description ('An introduction header for this sample' followed by an ID ('introductionHeader') prefixed with @@. Please see the Angular Internationalisation documentation for more details.
You can give strings that are the same, the same ID so it only needs to get translated once.
- Go to the client folder
cd client
- Extract the translatable content
ng xi18n --output-path src/locale
Copy the messages.xlf from the output location of step one (src/locale/messages.xlf) and translate into Khmer. There are editors out there for .xlf files that can help with this.
ng serve --aot --locale km --i18n-format xlf --i18n-file src/locale/messages.km.xlf
Commit the updated messages file. When the code gets deployed, it will automatically build the English and Khmer version of the code.