How to do fast localization for Android & iOS?
- Open google sheet in browser
- Create a new spreadsheet
- Create 4 columns. Key, English Translation, French Translation (for French) and French Translation Values.
- French Translation Column will use below formula to create values automatically by reading English Translation column values.
Formula:
=GoogleTranslate(B3, “en”, “fr”)
- In place of “en” we can use keyword “auto” for auto detecting language.
- Translated String (Android) column aims at creating values that we can directly copy paste in string.xml belonging to ‘values-fr’ folder.
Ex: For “Hello” value will be “Bonjour”. - This value will be created automatically applying Google Formulas for the cell value.
=”<string name” & “=” & char(34)& A3&char(34) & “>” & C3 & “</string>”
Now copy all values of “Translated String (Android)” column and paste them inside tag string.xml file created under “values-fr” folder.
Similarly, we can add translations for iOS projects also making use of below formula
=char(34)&B3&Char(34)&char(61)&char(34) &C3 &char(34)
We need to add column “Translated String (iOS)” and copy paste above formula in a 1st cell of that column. To add remaining values in the same column follow same drag method.
Get google sheet for above formula.
How to use this sheet?
- Step 1: Make a Copy of this sheet: File->Make a Copy
- Step 2: Keep your key from existing string.xml file in Column 1 (Applicable for Android only)
- Step 3: Keep your English reference String (Applicable for iOS only)
- Step 4: Keep your new translation in column 4 and 5, apply formula for column 3 by drag method
- Step 5: Apply the formula from column 4 for Android and Column 5 for iOS (By Command + Drag)
Language | ISO-639-1 Code |
Afrikaans | af |
Albanian | sq |
Amharic | am |
Arabic | ar |
Armenian | hy |
Azeerbaijani | az |
Basque | eu |
Belarusian | be |
Bengali | bn |
Bosnian | bs |
Bulgarian | bg |
Catalan | ca |
Cebuano | ceb (ISO-639-2) |
Chinese (Simplified) | zh-CN (BCP-47) |
Chinese (Traditional) | zh-TW (BCP-47) |
Corsican | co |
Croatian | hr |
Czech | cs |
Danish | da |
Dutch | nl |
English | en |
Esperanto | eo |
Estonian | et |
Finnish | fi |
French | fr |
Frisian | fy |
Galician | gl |
Georgian | ka |
German | de |
Greek | el |
Gujarati | gu |
Haitian Creole | ht |
Hausa | ha |
Hawaiian | haw (ISO-639-2) |
Hebrew | iw |
Hindi | hi |
Hmong | hmn (ISO-639-2) |
Hungarian | hu |
Icelandic | is |
Igbo | ig |
Indonesian | id |
Irish | ga |
Italian | it |
Japanese | ja |
Javanese | jw |
Kannada | kn |
Kazakh | kk |
Khmer | km |
Korean | ko |
Kurdish | ku |
Kyrgyz | ky |
Lao | lo |
Latin | la |
Latvian | lv |
Lithuanian | lt |
Luxembourgish | lb |
Macedonian | mk |
Malagasy | mg |
Malay | ms |
Malayalam | ml |
Maltese | mt |
Maori | mi |
Marathi | mr |
Mongolian | mn |
Myanmar (Burmese) | my |
Nepali | ne |
Norwegian | no |
Nyanja (Chichewa) | ny |
Pashto | ps |
Persian | fa |
Polish | pl |
Portuguese (Portugal, Brazil) | pt |
Punjabi | pa |
Romanian | ro |
Russian | ru |
Samoan | sm |
Scots Gaelic | gd |
Serbian | sr |
Sesotho | st |
Shona | sn |
Sindhi | sd |
Sinhala (Sinhalese) | si |
Slovak | sk |
Slovenian | sl |
Somali | so |
Spanish | es |
Sundanese | su |
Swahili | sw |
Swedish | sv |
Tagalog (Filipino) | tl |
Tajik | tg |
Tamil | ta |
Telugu | te |
Thai | th |
Turkish | tr |
Ukrainian | uk |
Urdu | ur |
Uzbek | uz |
Vietnamese | vi |
Welsh | cy |
Xhosa | xh |
Yiddish | yi |
Yoruba | yo |
Zulu | zu |