开发者

Adding new String resource to multiple (localized) strings.xml files in Android app

开发者 https://www.devze.com 2023-03-07 23:25 出处:网络
I have an app with support for several different languages. Now lets say I want to add a new feature, which will usually will require new string resources to be added.

I have an app with support for several different languages.

Now lets say I want to add a new feature, which will usually will require new string resources to be added.

What is the (Or is there)开发者_如何学C way to add new string resources that will be added automatically to all the localization strings files? (Means i'll just need to translate the content of the string and not to create new one with the same key for each localization file) Because it dosen't make any sense to copy-paste it manually when you have a lot of localization files...


If you follow Android localization rules, there isin't any other way other than manually adding to each language strings.xml file. You can script this but then you will have to write the script. So, my suggestion is to bite the bullet and do it.

As you said if there are a lot of files, then scripting it is best way, even then you may have to manually add the localized string values to each file.


What you refer to is common Localization problem. It is not just strings.xml and Android platform related.

As you might be guessing, people actually found ways to resolve it. Typically, you will send just the English file to translators (translation vendors) and they will update it using Translation Memory software.
Or if you are independent Software Developer, you may want to use some crowd-sourcing platform for your translations, like Launchpad, BabelZilla or Crowdin. These platforms also act as Translation Memory, so you won't have to manually synchronize individual language files.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号