Question

I want to create a new language package for a specific country in Magento 2. For example: I need English Language Package for Country "India". After a lot of debugging, I found that I can be able to use only the available language locales in the language list in Magento 2. Refer the below code.

bin/magento info:language:list

+--------------------------------+------------+
| Language                       | Code       |
+--------------------------------+------------+
| Afrikaans (South Africa)       | af_ZA      |
| Albanian (Albania)             | sq_AL      |
| Arabic (Algeria)               | ar_DZ      |
| Arabic (Egypt)                 | ar_EG      |
| Arabic (Kuwait)                | ar_KW      |
| Arabic (Morocco)               | ar_MA      |
| Arabic (Saudi Arabia)          | ar_SA      |
| Azerbaijani (Azerbaijan)       | az_Latn_AZ |
| Bangla (Bangladesh)            | bn_BD      |
| Basque (Spain)                 | eu_ES      |
| Belarusian (Belarus)           | be_BY      |
| Bosnian (Bosnia & Herzegovina) | bs_Latn_BA |
| Bulgarian (Bulgaria)           | bg_BG      |
| Catalan (Spain)                | ca_ES      |
| Chinese (China)                | zh_Hans_CN |
| Chinese (Hong Kong SAR China)  | zh_Hant_HK |
| Chinese (Taiwan)               | zh_Hant_TW |
| Croatian (Croatia)             | hr_HR      |
| Czech (Czechia)                | cs_CZ      |
| Danish (Denmark)               | da_DK      |
| Dutch (Belgium)                | nl_BE      |
| Dutch (Netherlands)            | nl_NL      |
| English (Australia)            | en_AU      |
| English (Canada)               | en_CA      |
| English (Ireland)              | en_IE      |
| English (New Zealand)          | en_NZ      |
| English (United Kingdom)       | en_GB      |
| English (United States)        | en_US      |
| Estonian (Estonia)             | et_EE      |
| Filipino (Philippines)         | fil_PH     |
| Finnish (Finland)              | fi_FI      |
| French (Belgium)               | fr_BE      |
| French (Canada)                | fr_CA      |
| French (France)                | fr_FR      |
| French (Luxembourg)            | fr_LU      |
| French (Switzerland)           | fr_CH      |
| Galician (Spain)               | gl_ES      |
| Georgian (Georgia)             | ka_GE      |
| German (Austria)               | de_AT      |
| German (Germany)               | de_DE      |
| German (Luxembourg)            | de_LU      |
| German (Switzerland)           | de_CH      |
| Greek (Greece)                 | el_GR      |
| Gujarati (India)               | gu_IN      |
| Hebrew (Israel)                | he_IL      |
| Hindi (India)                  | hi_IN      |
| Hungarian (Hungary)            | hu_HU      |
| Icelandic (Iceland)            | is_IS      |
| Indonesian (Indonesia)         | id_ID      |
| Italian (Italy)                | it_IT      |
| Italian (Switzerland)          | it_CH      |
| Japanese (Japan)               | ja_JP      |
| Khmer (Cambodia)               | km_KH      |
| Korean (South Korea)           | ko_KR      |
| Lao (Laos)                     | lo_LA      |
| Latvian (Latvia)               | lv_LV      |
| Lithuanian (Lithuania)         | lt_LT      |
| Macedonian (North Macedonia)   | mk_MK      |
| Malay (Malaysia)               | ms_MY      |
| Norwegian Bokmål (Norway)      | nb_NO      |
| Norwegian Nynorsk (Norway)     | nn_NO      |
| Persian (Iran)                 | fa_IR      |
| Polish (Poland)                | pl_PL      |
| Portuguese (Brazil)            | pt_BR      |
| Portuguese (Portugal)          | pt_PT      |
| Romanian (Romania)             | ro_RO      |
| Russian (Russia)               | ru_RU      |
| Serbian (Serbia)               | sr_Cyrl_RS |
| Slovak (Slovakia)              | sk_SK      |
| Slovenian (Slovenia)           | sl_SI      |
| Spanish (Argentina)            | es_AR      |
| Spanish (Bolivia)              | es_BO      |
| Spanish (Chile)                | es_CL      |
| Spanish (Colombia)             | es_CO      |
| Spanish (Costa Rica)           | es_CR      |
| Spanish (Mexico)               | es_MX      |
| Spanish (Panama)               | es_PA      |
| Spanish (Peru)                 | es_PE      |
| Spanish (Spain)                | es_ES      |
| Spanish (Venezuela)            | es_VE      |
| Swahili (Kenya)                | sw_KE      |
| Swedish (Finland)              | sv_FI      |
| Swedish (Sweden)               | sv_SE      |
| Thai (Thailand)                | th_TH      |
| Turkish (Turkey)               | tr_TR      |
| Ukrainian (Ukraine)            | uk_UA      |
| Vietnamese (Vietnam)           | vi_VN      |
| Welsh (United Kingdom)         | cy_GB      |
+--------------------------------+------------+

But I need to create a new locale en_IN. I know we can use the available english locale (en_US, en_AU,...), But I need to create a separate locale for India for some reason.

I have also tried to use the existing locale for India (gu_IN and hi_IN), and changed the translation file. Everything works fine but some default values like the country values in the Magento forms are displayed in the Gujarati/Hindi language. I cannot even translate the option value using the csv file.

Please provide me the good solution on how to solve this!!!.

Thanks in advance.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top