如何在不为每种语言创建strings.xml文件的情况下支持多语言应用程序? [英] How to support a multiLingual app without creating strings.xml files for every language?
问题描述
我正在尝试支持多语言android应用程序.在这里,问题是当我们每次更改语言时,我都需要构建应用程序,因为在strings.xml文件中添加了更多的字符串,但是其他语言的xml文件中不存在转换.如何解决这个问题?如何避免针对每种语言选择重新构建应用程序?
i am trying to support multilingual android Application. Here, the problem is when we change every time language, i need to build the app because of some more strings are adding in strings.xml file but that conversions are not exists in other language`s xml files. how to resolve this problem ? how to avoid re-building of app for every language selection?
推荐答案
如果有时间,资源等,一切都是不可能的.
Nothing is impossible, if you have time, resources, etc.
但是管理本地化应用的正确方法是使用strings.xml:更好,更快,更强大;)
But the right way to manage a localized app is to use strings.xml : better, faster, stronger ;)
更好?是.您知道所需的所有字符串的位置.
Better ? Yes. You know the location of all the strings you need.
更快?是.您要修改字符串吗?好吧,只需修改相应的strings.xml,不要浪费时间在您的项目中进行搜索.
Faster ? Yes. You want to modify a string ? Well, just modify the corresponding strings.xml and do not waste time to search it in your project.
更强?是.您要添加另一种语言的支持吗?还是有人可以为您提供翻译?只是在一个xml文件上工作,而不是在整个项目上工作
Stronger ? Yes. You want to add the support of another language ? Or somebody can provide you a translation ? Just work on an xml file, not the complete project
这篇关于如何在不为每种语言创建strings.xml文件的情况下支持多语言应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!