Automatic line feed

When I run the Android Lint check, I always get errors on the string resource. The error says that I did not translate my lines into all languages. Assuming that there are no people who know all the languages ​​in the world (if any, I’m not one of them), and this error has a realistic solution.

How can I fix this problem? Is there a way to do this automatically (e.g. using Google Translate)?

Error "<the-string-name>" is not translated in af, am, ar, be, bg, ca, cs, da, de, el, en-rGB, es, es-rUS, et, fa, fi, fr, hi, hr, hu, in, it, iw, ja, ko, lt, lv, ms, nb, nl, pl, pt, pt-rBR, pt-rPT, ro, ru, sk, sl, sr, sv, sw, th, tl, tr, uk, vi, zh-rCN, zh-rTW, zu

EDIT
I know how to disable this error. This error does not exist to disable it ...

+3
source share
3 answers

You can use Google Translate, but in my experience this will lead to a very poor translation. Automatic language translation is still almost not perfect.

To get good translations, you will need people to translate your lines for you.

If you have many very useful, multilingual friends, people will cost you money.

Many different translation services are available on the Internet, including recently announced by Google. It is available on Beta in the developer’s console under "Services and Apis"

enter image description here

+2
source

I created a tool available in sourceforge that you can use. https://sourceforge.net/projects/androidresourcetranslator/

+7
source
  • Automatic translation is really not secure, but I found it to be a good starting point. If you use plain English, which is a good idea anyway, translations are mostly fine. In addition, human translators correct the automatically generated translation faster than they do from scratch.

  • You can get automatic Google translation for strings.xml from a simple Python script that sends URL requests. It is based on Khayam Gondal's solution , but has some improvements regarding URL processing, XML parsing, and UTF8 encoding. I did this for my Android application and asked some carriers to check this, they have changed very little (as of 2018-04).

  • Better automatic translations for 7 European languages ​​(DE, EN, FR, ES, IT, PL, NL) can be obtained from deepl.com , but you need to pay for using the API. If you separate XML tags programmatically from your strings.xml and copy-paste the result into a web page, you can get very good translations with little effort (and without paying money).

0
source

Source: https://habr.com/ru/post/904699/


All Articles