是否可以访问App Bundle的en.lproj? [英] Is it possible to access the App Bundle's en.lproj?

查看:209
本文介绍了是否可以访问App Bundle的en.lproj?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够更改语言目录中的语言文件。例如,假设我有一个日语更新,然后我可以让应用程序从FTP站点获取localizable.strings文件,然后写入jp.lproj目录。

I would like to be able to change the language files within the language directories. For example let say I have a japanese language update, then I can have the app grab a localizable.strings file from a FTP site, and then write to the jp.lproj direcotry.

另一个例子是将新语言上传到应用程序。我的应用程序将再次从FTP站点加载localizable.strings文件,然后创建一个ch.lproj目录并将该新语言放在那里。

Another example is to have a NEW language uploaded to the app. My app would again load the localizable.strings file from a FTP site, and then create a ch.lproj directory and put that new language in there.

这可能吗?

谢谢。

推荐答案

整个应用程序包对应用程序是只读的。你不能在那里添加或修改文件。

The entire app bundle is read-only for the app. You can not add or modify files in there.

你可以存储资源,例如在库/应用程序支持中并从那里加载它们。你必须更换,例如 NSLocalizedString by NSLocalizedStringFromTableInBundle ,或在 initWithNibName中指定资源包:bundle:,这可能会变得复杂。

You could store resources e.g. in "Library/Application Support" and load them from there. You would have to replace e.g. NSLocalizedString by NSLocalizedStringFromTableInBundle, or specify your resource bundle in initWithNibName:bundle:, so that might get complicated.

这篇关于是否可以访问App Bundle的en.lproj?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆