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 应用程序的翻译?
基础教程推荐
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
