Hakone.Japan

It’s common that an android developer is working on several projects. Sometimes, you just need some existing string translations from another Android project. Usually, the translated strings are scattered in strings.xml file in tens of folders named values-xx. There’s no easy way to copy these string definitions from multiple folders into new project.

Therefore, I wrote a simple python script to do the job. All you have to do is:

  1. Configure input and output folder (usually it would be looked like …/project_name/app/src/main/res/ )
  2. run commands for each string key you wanna copy.

View gist

new_string_key is optional if you expect using the same string key in new project.

Here’s the link to Github repository. Happy Coding~

plateaukao/AndroidExtractTranslatedString