Skip to content

This hack lets you translate your android app quite easily for 118n.

License

Notifications You must be signed in to change notification settings

avipars/Android_App_Translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Android App Translation Project

This hack lets you translate your android app quite easily for 118n.

Tools

  • Powershell

  • Google Sheets

Powershell Specifics

Using powershell, you can export your strings.xml (english or default language) to a csv with the key and the value pair. In this case the key and the string text itself.

After going through this task, you can then upload it to google sheets (free spreadsheet solution). Now you can play with some formulas to use google translate to translate your string and then have it export to another strings.xml for each language.

This is hacky, because it isn't a platform within itself, and some parts may fail. I have a small app and couldn't find a platform to accommodate my projects.

In the powershell script, you'll have to modify the location of the strings.xml file. In my case, I didn't use the original strings file , but I would recommend you do, as the file gets changed quite frequently.

The script also doesn't include any strings that have the attribute translatable=false, but that is easy to modify.

Google Sheets Specifics

Here is the google sheets, https://docs.google.com/spreadsheets/d/1m4y2_uzBchGoXwfh3aRUGX0qpa6FLo-BWqUAKvT8EZc/edit?usp=sharing You just need to go to File -> Make a copy

Right now, you can copy the right columns, as needed to your newly created strings files in Android Studio. I am considering was to improve this whole process, and would love your feedback.

If you want to bring on volunteer translators, you could block off access to certain crucial cells or columns. Just right click on a selection and choose "Protect range". I'd recommend blocking off the keys and the Final values, as they really don't need to be touching those.

Possible issues

  • Special characters within the strings file such as '%1$s' may not resolve successfully. Before copying the strings.xml file, verify that this is not the case.

Applications

  • I'm integrating this with my unitMeasure app. If you'd like to help translate the app, join the telegram group https://t.me/unitmeasure

Credits

Medium Story

Buy Me A Coffee

About

This hack lets you translate your android app quite easily for 118n.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published