你如何管理翻译为你的Andr​​oid应用程序?你的、应用程序、译为、Andr

2023-09-04 23:46:28 作者:一蓑烟雨

皮棉工具会告诉你关于硬codeD字符串或丢失的翻译,但怎么样,如果你想更新现有的字符串?

Lint tool tells you about hardcoded strings or missing translations, but how about if you want to update an existing string?

你如何跟踪哪些需要串被再次转换,当你更新现有的字符串?

How do you keep track of which strings need to be translated again when you update an existing string?

解决方案之一是,如果你想改变一个字符串使用的strings.xml一个新的关键,然而,这需要更新在code,所使用的旧密钥的所有引用。

One solution is to use a new key in strings.xml if you want to change a string, however this requires updating all references in code that used the old key.

推荐答案

如果您还没有翻译的语言Android操作系统将选择存储在值文件夹的默认值。

If you do not have translation for a language Android OS will choose your default values that are stored in the value folder.

要与本地化的你也可以用工作塞阔亚Android的本地化编辑器。使用它,你可以看到所有的字符串键,并赋值。下面是它的一个快照:

To work with localisations you can also use Sequoyah Android Localization Editor. Using it you can see all the string keys and assigned values. Here is a snapshot of it:

因此​​,对于每个本地化你将有一个单独的列。

So for each localization you will have a separate column.