Easiest way to translate Android strings.xml file

╄→гoц情女王★ 提交于 2019-11-30 04:55:47

Check out my Python scripts at Github. It works here behind a web page. You feed

strings.xml

plus IN and OUT language codes, Google Translate does the rest. Works best if you use simple unambiguous English. Kudos to Khayam Gondal, on whose work I build.

I use translation editor, its not automatic but still very convenient way and it is built into Android Studio. Also take a look on this answer, that guy created a tool that making the translation automatically.

Since CTRL+A not working now in the android studio. There is one way to convert the android strings file to CSV and then translate it with the help of google translator and then again convert back to XML.

https://skydevelopers.net/blog/2-best-ways-to-translate-the-android-strings-file/

here is a blog in detail

Use this Python script. You can also translate into multiple languages at once.

EDIT: The above library has a limit. Since it uses unofficial googletrans library it doesn't work sometimes.

I have created another library here which uses quota of your GCP. It is faster and reliable. You can bulk translate, and has option to translate to all available language at once. https://github.com/bikcrum/Android-String-Translator-GCP

I recently published an app for this purpose. It translates a strings.xml file into other languages quickly and easily, and after translation it is possible to edit and view all translatable strings. Translations are provided by Google Translate and in case of errors or bad formatting, which usually happens when translating strings with HTML markup, you can easily correct based on the original string.

Check out the app in the Play Store for more details.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!