Lint 工具会告诉您有关硬编码字符串或缺少翻译的信息,但是如果您想更新现有字符串呢?
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 中使用新键,但这需要更新使用旧键的代码中的所有引用.
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 OS 将选择存储在 value 文件夹中的默认值.
If you do not have translation for a language Android OS will choose your default values that are stored in the value folder.
要使用本地化,您还可以使用 Sequoyah 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.
这篇关于您如何管理您的 Android 应用程序的翻译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!