Localisation
Overview
This guide helps you add and verify translations (labels, status, messages) used in the PGR (Public Grievance Redressal) module, using Postman APIs.
Localisation allows the Complaints module to support multiple languages like English (en_IN), Hindi (hi_IN), etc. It ensures users see the correct labels and messages on the UI, based on their selected language.
Configure Localisation
Prepare Required Details
Before running the API, replace these values in Postman:
Domain URL
Replace with your environment’s base URL (e.g., https://dev.digit.org)
authToken
Use a Superuser token (must have access to localization APIs)
locale
en_IN for English, hi_IN for Hindi
tenantId
Use state-level tenant like pb (❌ Do NOT use ULBs like pb.amritsar)
module
Always set this to rainmaker-pgr for PGR
messages
Load from MDMS or DIGIT GitHub localisation files
Load Localisation Messages
API Endpoint: POST /localisation/messages/v1/_upsert
Sample Payload:
{
"RequestInfo": {
"authToken": "REPLACE_WITH_VALID_TOKEN"
},
"messages": [
{
"code": "PGR.SERVICEDEFS.NoStreetlight",
"message": "No Streetlight",
"module": "rainmaker-pgr",
"locale": "en_IN",
"tenantId": "pb"
},
{
"code": "PGR.SERVICEDEFS.StreetLightNotWorking",
"message": "Street Light Not Working",
"module": "rainmaker-pgr",
"locale": "en_IN",
"tenantId": "pb"
}
]
}
Repeat the same for hi_IN or other required locales.
Verify Loaded LocalisationLocalization
API Endpoint: POST /localisation/messages/v1/_search
Request Payload:
{
"RequestInfo": {
"authToken": "REPLACE_WITH_VALID_TOKEN"
},
"tenantId": "pb",
"module": "rainmaker-pgr",
"locale": "en_IN"
}
What to check:
Confirm if your keys and translations appear correctly.
If you don't see the expected keys, check for:
Missing or wrong tenantId, module, or locale
Incorrect format in the payload
Localisation Keys
Localise the following types of messages:
PGR.SERVICEDEFS.<ServiceCode>
"Street Light Not Working"
PGR.<Status>.Label
Status labels like PGR.RESOLVED.Label
PGR.<Action>.Label
Workflow actions like PGR.REOPEN.Label
Other UI strings
Page titles, menu items, form labels
Copy the localisation keys from:
DIGIT’s localisation GitHub repo
Existing environments already running PGR
Notes & Best Practices
authToken
Use a superuser or user with permissions to update localisation
tenantId
Always use state-level tenant ID like pb
module
Must be set to rainmaker-pgr for the PGR module
locale
Use supported codes: en_IN, hi_IN, etc.
Summary
Use Postman to upload and verify messages.
Make sure the format, module name, and tenant ID are correct.
Load keys for both English and other required languages.
After loading, use the search API to verify your keys.
Last updated
Was this helpful?