# 5. Add New Language

### 5.1 What is this?

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

### 5.2 What you need

<table><thead><tr><th width="174.7890625">Item</th><th width="353.47265625">Description</th><th>Example</th></tr></thead><tbody><tr><td>Gateway URL</td><td>Your system's gateway URL</td><td><a href="https://qa.digit.org">https://qa.digit.org</a></td></tr><tr><td>Username</td><td>Admin username with MDMS_ADMIN role</td><td>MDMSADMIN</td></tr><tr><td>Password</td><td>Your password</td><td>********</td></tr><tr><td>State Tenant ID</td><td>State-level tenant code</td><td>pg</td></tr><tr><td>Target Tenant IDs</td><td>Cities where you want the language</td><td>pg.citya, pg.cityb</td></tr><tr><td>Language Name</td><td>Display name for users</td><td>Hindi</td></tr><tr><td>Locale Code</td><td>Language code</td><td>hi_IN</td></tr></tbody></table>

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

***

### 5.4 Fill in translations

Open the downloaded Excel file, and 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) |

<figure><img src="/files/tjPHqT7vpjsrBqwkTwgY" alt=""><figcaption></figcaption></figure>

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) and upload in the notebook directory.

***

### 5.5 Upload the translations file

Upload the updated Excel back into the notebook directory. Use the upload cell shown in the notebook.

### 5.6 Process the data

<div align="left"><figure><img src="/files/4128nZt7mRtfNULfXjGP" alt=""><figcaption></figcaption></figure></div>

### 5.7 Verify ingestion

<div align="left"><figure><img src="/files/t1AJsn8lCO0ic2BbxdYd" alt=""><figcaption></figcaption></figure></div>

### 5.8 Verify in the application

Step 1: Open your CMS 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                        |

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

***

### 5.10 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 5.6 and 5.7)

The system will update (not duplicate) the messages.

***

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

***

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

### 5.13 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/5.-add-new-language.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.
