Daniel S
Daniel S

Reputation: 113

Quickest way of translating string.xml file

I created an app in english but I have a huge user base of spanish and french users so I thought of translating the app in french and spanish languages , now there are two problems, first problem I am having is that there are over 3000 strings to be translated and I am not a native speaker so I have to copy each string, paste it into google translator and then put it in the language editor of android studio, and its very time consuming, frustrating and tiring, the second problem is that some strings are repeated for example Sign up with facebook or Back or Open and these appear multiple times in the language editor so I have to redo them all again and again. So I am wondering if there is a quick way around this to save time and with less effort I get the work done.

Upvotes: 8

Views: 13229

Answers (4)

Asep
Asep

Reputation: 83

use AndroidLocalize plugin

https://plugins.jetbrains.com/plugin/11174-androidlocalize

enter image description here

Android localization plugin. supports multiple languages and multiple translators.

Features

  • Multiple translator support:
    • Google translator.
    • Microsoft translator.
    • Baidu translator.
    • Youdao translator.
    • Ali translator.
    • DeepL translator.
    • OpenAI ChatGPT translator.
  • Supports up to 100+ languages.
  • One key generates all translation files.
  • Support no translation of existing string.
  • Support for specifying that text is not translated.
  • Support for caching translated strings.
  • Support to set the translation interval time.

Usage

  • Step 1: Select the values/strings.xml(or any string resource in values directory).
  • Step 2: Right click and select "Translate to Other Languages".
  • Step 3: Select the languages to be translated.
  • Step 4: Click OK.

Upvotes: 6

ibad ur rahman
ibad ur rahman

Reputation: 1411

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

Credit: Ra-Na

Upvotes: 28

DEEPAK
DEEPAK

Reputation: 1

You can use Google Translator Toolkit. But I still recommend you to go with the native translator. You won't get reliable quality in Machine translation like Google translate or Bing. Try translation agencies like Activeloc for quicker turnarounds and quality translation.

Upvotes: 0

Karol Kulbaka
Karol Kulbaka

Reputation: 1274

There is no ready solution (as Iong as I know) for your problem. Only thing that I can suggest is export all transactions to file and write gradle plugin or standalone app which will parse exported sources to xml file. If all transactions is in this same sequence there shouldn't be problem with this :)

Upvotes: 0

Related Questions