# 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.

![](/files/bYNzckENsA9OTepSczk6)

#### 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.

![](/files/VtwuEqp20I7T8e4JupnT)

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

![](/files/nGvYk60RMHK63YTqw0BM)

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    |

![](/files/yT8MsQXBQ87uGMLCfbRE)

***

#### 7.6 Step 2: Fetch Localisation Data

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

![](/files/8ImZP7AvAwgJUZ8XGJyN)

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...

&#x20;     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

![](/files/FB6sQq9I4s2EQSOAlK6T)

***

#### 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) |

![](/files/tjPHqT7vpjsrBqwkTwgY)

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

![](/files/S2ivCFyDCMc7w5iXZwne)

Step 2: Select your filled Excel file

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

Wait for validation:

📋 VALIDATING UPLOADED FILE

\[Localisation File]

&#x20;  📄 File: localization.xlsx

&#x20;  🔍 Validating... ✅ PASSED

&#x20;  💾 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.

![](/files/teOotvs9L6mlTZgQCEmU)

Run the cell and wait:

\[STEP 4: UPLOAD TRANSLATIONS]

\[1/2] Uploading localisation messages...

&#x20;     Total Messages: 12,752

&#x20;  \[OK] Locale: hi\_IN

&#x20;  Created: 12,752 messages

✅ Localisation messages uploaded successfully!

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

&#x20;  \[OK] \[1/2] pg.citya - Language added successfully

&#x20;  \[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&#x20;
* 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             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/complaints-management/complaints-resolution-v2.10/deploy/setup/production-setup/deploy-complaints-management/unified-approach-not-for-publish/7.-add-new-language-optional.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
