As a Mobile app developer or promoter, you need to be clear that App localization will always increase your app’s visibility and explorer. This automatically increases the app’s active users and ultimately, your revenue will also increase.“The world is getting smaller and smaller every day.” – To really maximize your apps potential reach, you need to customize your app that will serve different users in different regions and that is done through mobile app localization.Localization is the process of customize apps that will work in different languages. Localization can include different spoken variations, which are referred to as locales.As a developer, We are implementing localization in many apps, So automation is needed for app localization. Our point is mitigate task of adding translations for multiple locale needed for android and ios app development projects using Google sheets formula. I am assuming that you are familiar with adding localization by using string.xml for Android and localised.strings in iOS. Instead of adding translated text for each keys using Translations Editor, I prefer you to use the automation creation of string values from google sheets. Lets see procedure for achieve the same.Steps to make Google sheets for localization.
- Create new spreadsheet and name it according to your project name.
- Create total 5 columns.
- Key,
- English translation,
- French translation,
- Translated strings for iOS &
- Translated strings for Android.
- Key columns will have all the keys which are using in Strings.xml file which is used.
- English translation column will have values for english language reference.
- French translation column will have values for french language reference.
- In Translated strings for iOS & Translated strings for Android column, Will create respective string resource values using formulas.
We are use below formula to make French translation for Android apps by using English translation values.
=GoogleTranslate(B3, "en", "fr")
You can set this by using below Drag methods.We are using below formula to make “Translated strings for Android” column values.
="<string name" & "=" & char(34)& A3&char(34) & ">" & C3 & "</string>"
This column creates values that we use in string.xml belonging to ‘values-fr’ folder.Ex: For “How are you?” value will be “Comment allez-vous?”.You can paste this formula in a Translated column in the first row. Value for remaining rows can easily filled by Drag methods. Move cursor over the cell and you will get plus symbol on blue dot. Click and hold and drag to last bottom row in the same column. Values will be created automatically using formula by updating the corresponding row and column indexes. You can see this process below.Now copy all values of “Translated strings for Android” column and paste them inside string.xml file created under “values-fr” folder.We are using below formula to make “Translated strings for iOS” column values.
=char(34)&B3&Char(34)&char(61)&char(34) &C3 &char(34)
You can add “Translated strings for iOS” column and paste above formula in first cell of that column. For add remaining value you can use drag method shown in above.Once all values are created, copy all column values and paste it into localised.strings (French) file.You can check this excel sheet for localization reference with required formula.
For any queries !! Just fill up the contact form and our experts will get back to you soon.
About Author
Pankaj Sakariya - Delivery Manager
Pankaj is a results-driven professional with a track record of successfully managing high-impact projects. His ability to balance client expectations with operational excellence makes him an invaluable asset. Pankaj is committed to ensuring smooth delivery and exceeding client expectations, with a strong focus on quality and team collaboration.