How do you manage translations for your Android app?(您如何管理您的 Android 应用程序的翻译?)
问题描述
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 应用程序的翻译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:您如何管理您的 Android 应用程序的翻译?


基础教程推荐
- 如何使 UINavigationBar 背景透明? 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01