您如何管理您的 Android 应用程序的翻译?

2023-09-12移动开发问题
2

本文介绍了您如何管理您的 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 应用程序的翻译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

硬件音量按钮更改应用程序音量
Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)...
2024-08-12 移动开发问题
10

Cocos2d - 如何检查不同层中对象之间的交集
Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)...
2024-08-12 移动开发问题
8

恢复游戏 cocos2d
Resume game cocos2d(恢复游戏 cocos2d)...
2024-08-12 移动开发问题
6

突出显示朗读文本(在 iPhone 的故事书类型应用程序中)
Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))...
2024-08-12 移动开发问题
9

Cocos2D + 仅禁用 Retina iPad 图形
Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)...
2024-08-12 移动开发问题
10

如何将 32 位 PNG 转换为 RGB565?
How to convert 32 bit PNG to RGB565?(如何将 32 位 PNG 转换为 RGB565?)...
2024-08-12 移动开发问题
21