4

Some applications often happen to use the same strings. Say we have project A already translated in 19 languages, in which many strings will be used in a similar context in project B.

Is there a tool that could extract a subset of strings from the 19 localized xml in project A and contribute them to project B's xml files?

For example, in the Android Studio translation editor, if we could copy-paste the whole rows from one file to another, that would already help a lot!

1
  • Days ago I developed the same type of tool in C#. You need to create only English strings.xml and this tool will convert all folder structure and string.xml files using Google translation API. But lots of time translator do not work properly. So I'm not using this Commented Oct 17, 2016 at 18:30

1 Answer 1

1

You can create Android Library (AAR) with all the string (and other resources) you want to share across your projects. Details are here: https://developer.android.com/studio/projects/android-library.html

Sign up to request clarification or add additional context in comments.

2 Comments

Yes, that could be a solution. However, I don't like the fact that there will be a bunch of unused string in each project depending on the resource module. I'll take a look in the generated apk to see if the unused ones are preserved.
Verification done, the unused resources are indeed left there, even after Proguard optimisation went through.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.