Localisation Module
Setting up localisation strings
Overview
This guide goes through inserting basic localisation for core DIGIT modules post-installation. Currently, localisation is an extra step post-install. We enter localisation data in bulk via REST API calls. Postman collection is available to facilitate this process.
Localisation Structure - Brief
The releasekit repository contains all the localisation strings separated per module.
Base localisation strings are provided in the baseline folder. Localization is done per module per release. New strings in each release are contained in the respective release version folder. Depending on what modules have been installed, the localization strings have to be collated and then seeded using Postman Scripts.
For example, if DIGIT v2.7 with the PGR module has been installed, the localization strings for the PGR module have to be collated in the following order in JSON:
Baseline localization strings
v2.3
v2.4
v2.5
v2.6
v2.7
For convenience, a consolidated JSON file per module is created with each release under the consolidated folder. To add the messages, copy the json string of one module and paste it into the body of the JSON request and hit upsert. Repeat this for each module.
Localisation Setup
Download the postman collection - Setup an environment in postman and add the following variables:
authToken
tenantId
Login to DIGIT as a citizen user from the browser. To get auth token on your webpage, right-click and go to Inspect > Network > payload > RequestInfo. Here you will find a variable named authToken which will be a 32-bit string. Paste it in the values field of the
authToken
variable in Postman and click on Save.Run the Insert Localization script after adding the required localization messages for each module from releasekit consolidated folder in the Postman script body.
Run each module separately. Else, the server will throw a 40x error.
The modules to set up depending on what has been installed as part of DIGIT. For the DIGIT Core, we require localisation to be set up for the user module.
Module | Localization folder |
---|---|
egov-user |
Search endpoint: domain/localization/messages/v1/_search
Upsert endpoint: domain/localization/messages/v1/_upsert
Last updated