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 应用程序的翻译?


基础教程推荐
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01