DIGIT CORE
Search…
Localisation Module
Setting up localisation strings
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 & explanation

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 PGR module has been installed, the localization strings for the PGR module have to be collated in the following order in JSON:
  1. 1.
    Baseline localization strings
  2. 2.
    v2.3
  3. 3.
    v2.4
  4. 4.
    v2.5
  5. 5.
    v2.6
  6. 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 in the body of the JSON request and hit upsert. Repeat this for each module.

Setup localisation

  1. 1.
    Download the postman collection . Setup an environment in postman and add the following variables:
    1. 1.
      authToken
    2. 2.
      tenantId
  2. 2.
    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 "Save".
  3. 3.
    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 an 40x error.
The modules to setup depends on what has been installed as part of DIGIT. For DIGIT core, we require localisation to be setup for user module.
Module
Localization folder
  • Search endpoint: domain/localization/messages/v1/_search
  • Upsert endpoint: domain/localization/messages/v1/_upsert
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Copy link
On this page