For the complete documentation index, see llms.txt. This page is also available as Markdown.

7. Add New Language (Optional)

7.1 What is This?

This step allows you to add a new language (like Hindi, Tamil, Punjabi) to your CRS system so users can view the application in their preferred language.

7.2 What You Need

Item
Description
Example

Gateway URL

Your system's gateway URL

https://qa.digit.org

Username

Admin username with MDMS_ADMIN role

MDMSADMIN

Password

Your password

********

State Tenant ID

State-level tenant code

pg

Target Tenant IDs

Cities where you want the language

pg.citya, pg.cityb

Language Name

Display name for users

Hindi

Locale Code

Language code

hi_IN

7.3 Common Locale Codes

Language
Locale Code
Native Name

Hindi

hi_IN

हिंदी

Tamil

ta_IN

தமிழ்

Punjabi

pa_IN

ਪੰਜਾਬੀ

Bengali

bn_IN

বাংলা

Telugu

te_IN

తెలుగు

Marathi

mr_IN

मराठी

Gujarati

gu_IN

ગુજરાતી

Kannada

kn_IN

ಕನ್ನಡ

Malayalam

ml_IN

മലയാളം

Odia

or_IN

ଓଡ଼ିଆ

Assamese

as_IN

অসমীয়া

Format Rule: language_COUNTRY

  • language = 2 lowercase letters (hi, ta, pa)

  • COUNTRY = 2 uppercase letters (IN)


7.4 Open the Localisation Notebook

Step 1: In Jupyter, find and open fetch_localization_ui.ipynb

Step 2: The notebook will open with multiple sections

Step 3: Run the first two cells to install and import the required modules


7.5 Step 1: Authenticate with Gateway

This step logs you into the system.

Fill in the form:

Field
What to enter
Example

Gateway URL

Your system URL

https://qa.digit.org

Username

Your admin username

MDMSADMIN

Password

Your password

********

State Tenant ID

State code

pg

Click the "🔐 Authenticate" button

Wait for the success message:

✅ AUTHENTICATION SUCCESSFUL!

👤 Logged in as: MDMSADMIN

🏛️ Tenant: pg

🎭 Roles: MDMS Admin (MDMS_ADMIN)

➡️ Proceed to Step 2: Fetch Localisation Data

If authentication fails:

Problem
Solution

Wrong password

Check your password and try again

Permission denied

Ask IT team for MDMS_ADMIN role

Connection error

Check gateway URL and internet


7.6 Step 2: Fetch Localisation Data

This step downloads all English messages and creates a template for your language.

Fill in the form:

Field

What to Enter

Example

Target Tenant IDs

Cities (comma-separated)

pg.citya, pg.cityb

New Language

Display name

Hindi

New Locale Code

Language code

hi_IN

Click the "📥 Fetch Data" button

Wait for the process to complete:

[1/4] Reading existing translations...

[2/4] Fetching all English messages from API...

[3/4] Parsing messages...

Found 12,752 messages

[4/4] Creating Excel with locale 'hi_IN'...

✓ File saved successfully! Size: 245.67 KB

📥 Download file: localization.xlsx

Click the download link to save the Excel file


7.7 Step 3: Fill in Translations

Open the downloaded Excel file

You will see these columns:

Module

Code

Locale

Message

rainmaker-pgr

PGR_COMPLAINT_TYPE_GARBAGE

hi_IN

(empty - fill this)

rainmaker-pgr

PGR_COMPLAINT_TYPE_WATER

hi_IN

(empty - fill this)

Fill the "Message" column with translations:

Example translations (Hindi):

Code

English Meaning

Hindi Translation

PGR_COMPLAINT_TYPE_GARBAGE

Garbage Collection

कचरा संग्रहण

PGR_COMPLAINT_TYPE_WATER

Water Supply

जल आपूर्ति

COMMON_SUBMIT

Submit

जमा करें

COMMON_CANCEL

Cancel

रद्द करें

Important Rules:

✅ DO

❌ DON'T

Translate ALL messages

Leave any cell empty

Use native script

Change Module, Code, or Locale columns

Keep placeholders like {0}, {1}

Add or delete rows

Save the file

Change the sheet name

About Placeholders:

If you see {0} or {1} in English, keep them in your translation:

English

Hindi

Welcome {0}, you have {1} complaints

स्वागत है {0}, आपके पास {1} शिकायतें हैं

Save the file when done (Ctrl+S or Cmd+S)


7.8 Step 4: Upload Translated File

Go back to the Jupyter notebook.

Step 1: Click the "Choose Files" button

Step 2: Select your filled Excel file

Step 3: Click "⬆️ Validate & Upload File" button

Wait for validation:

📋 VALIDATING UPLOADED FILE

[Localisation File]

📄 File: localization.xlsx

🔍 Validating... ✅ PASSED

💾 Saved to: upload/localization.xlsx

✅ File validated successfully!

➡️ File ready to be uploaded to the system.

If validation fails:

Error

Cause

Solution

"message must not be empty"

Empty cells in Message column

Fill all empty cells

"Invalid file format"

Wrong file selected

Use the downloaded template

"Required column missing"

Column was deleted

Re-download template

7.9 Step 5: Upload to System

Run the upload cell to send translations to the system.

Run the cell and wait:

[STEP 4: UPLOAD TRANSLATIONS]

[1/2] Uploading localisation messages...

Total Messages: 12,752

[OK] Locale: hi_IN

Created: 12,752 messages

✅ Localisation messages uploaded successfully!

[2/2] Updating tenant languages for 2 tenant(s)...

[OK] [1/2] pg.citya - Language added successfully

[OK] [2/2] pg.cityb - Language added successfully

✅ Language added to 2 tenant(s)!

🎉 Process complete! Proceed to Step 5 to verify.

7.10 Step 6: Verify in Application

Step 1: Open your CRS application and login

Step 2: Login to one of your target tenants (e.g., pg.citya)

Step 3: Find the language selector (usually in the header)

Step 4: Click the language dropdown

Step 5: Select your new language (e.g., Hindi)

Step 6: Verify the translations appear

What to check:

Area

What Should Change

Complaint Types

कचरा संग्रहण instead of Garbage Collection

Buttons

जमा करें instead of Submit

Menu Items

All navigation in Hindi

Form Labels

All field names in Hindi

Error Messages

All errors in Hindi

7.11 Troubleshooting Language Issues

Problem 1: Language not in dropdown

Cause

Solution

Tenant update failed

Check upload output for errors

Wrong tenant login

Login to target tenant (pg.citya)

Browser cache

Clear cache and reload (Ctrl+Shift+R)


Problem 2: Translations not appearing

Cause

Solution

Upload failed

Check for "Failed: X" in output

Cache issue

Wait 2-3 minutes, clear cache, reload

Logout and login again

Sometimes session needs refresh


Problem 3: Some text is still in English

Cause

Solution

Empty cells in Excel

Check and fill missing translations

Module-specific messages

Contact IT for additional translation keys


7.12 Updating Existing Translations

To update translations for a language you already added:

Step 1: Run "Fetch Data" again with the same locale code

Step 2: The Excel will show your existing translations

Step 3: Edit the translations you want to change

Step 4: Upload the file again (Steps 6.8 and 6.9)

The system will update (not duplicate) the messages.


7.13 Adding Language to More Cities

To add an existing language to new cities:

Step 1: Run "Fetch Data" with new Target Tenant IDs

Example: pg.cityc, pg.cityd

Step 2: Use the same locale code (e.g., hi_IN)

Step 3: Excel will show existing translations (no need to re-translate)

Step 4: Upload the file

Only the tenant configuration will be updated.


7.14 Language Upload Checklist

Use this checklist to track your progress:

Authentication

  • Gateway URL entered correctly

  • Username and password correct

  • Authentication successful

  • Fetch Data

  • Target Tenant IDs entered

  • Language name entered

  • Locale code entered correctly

  • Excel file downloaded

Translation

  • All messages translated

  • No empty cells

  • Placeholders {0}, {1} preserved

  • File saved

Upload

  • File validated successfully

  • Messages uploaded (0 failed)

  • Tenants updated (0 failed)

Verification

  • Language appears in the dropdown

  • Translations display correctly

  • Tested all major screens

  • Tested on mobile

7.15 Best Practices for Translation

Quality Tips:

✅ Good Practice

❌ Avoid

Use professional translators

Rely only on Google Translate

Keep terminology consistent

Mix formal and informal tone

Have native speakers review

Deploy without review

Test with real users

Skip user testing

Last updated

Was this helpful?