问题描述
我希望能够通过应用中的代码来更新本地化的字符串.我真正想做的是对服务器上的本地化进行更改,然后让iPhone应用程序从服务器上获取更新的本地化字符串,然后将其保存到localizable.strings文件中.
I want to be able to update localized strings by code from the app. What I actually want to do is to make changes to the localization on a server and then let the iPhone application fetch updated localization strings from a server and then save them to the localizable.strings file.
推荐答案
您不能!这些文件是捆绑软件的一部分,无法更新.您将必须自己设置整个翻译框架(这不是很多工作),并使用核心数据或序列化字典(我想每种语言都应该有一个字典)来实现缓存.
You can't ! Those files are part of the bundle and can't be updated. You will have to setup the whole translation framework by yourself (which is not that much work) and implement caching using either core data or serialized dictionaries (one for each language I suppose).
这篇关于如何通过代码从应用程序更新localizable.strings?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!