eGov platforms provide multi language features
Language configurations :
The language configuration is done in https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/common-masters/StateInfo.json
"hasLocalisation" : true,
"languages" : [ { "label": "ENGLISH", "value": "en_IN" }, { "label": "हिंदी", "value": "hi_IN" }, { "label": "ਪੰਜਾਬੀ", "value": "pn_IN" } ],
How are messages shown in UI ?
API : /localization/messages/v1/_search
'rainmaker-common' module is used across application(e.g. Side bar, Header, login, logout etc), so we are keeping locale keys belonging to common module every time.
‘rainmaker-pt' module is used for Property Tax module. Maximum keys of Property Tax module are under ‘rainmaker-pgr’ module. It is difficult to separate PT keys from PGR. That’s why in PT, we are using both ‘rainmaker-pt' and 'rainmaker-pgr’ module together to display all the locale keys.
If the locale key is displaying instead of corresponding text in the UI, make sure the locale key is present under correct module.
If any new module is created (e.g. ‘abc') then create the corresponding locale module adding prefix 'rainmaker-’ to it.
Make sure module name is present in the Navigation URL.
WithAuthrization HOC is responsible for calling the locale API for respective module. It is identifying the module name from navigation URL. (e.g. '/wns/apply?')
Do not call localization api anywhere else inside the application except tenantID specific locales.
Add new module to getModuleName() function under ‘egov-ui-kit/utils/commons.js’ file.