iOS本地化(Localizable.strings)无法正常工作 [英] iOS Localization (Localizable.strings) not working
本文介绍了iOS本地化(Localizable.strings)无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有错误消息的应用。我想翻译此错误消息。
I have an app with an "Error" message. I want to translate this error message.
好的,首先我创建了一个名为Localizable.strings的文件。在我写的文件中:
OK, first I created a file named "Localizable.strings". In the file I wrote:
"ERR" = "Error";
然后在我的.m文件中写道:
then in my .m file I wrote:
self.label1.text = NSLocalizedString(@"ERR", nil);
这不起作用。我也尝试(当然)使文件本地化并添加更多语言。但它不起作用。
and this will not work. I also tried (of course) to make the file localized and added more languages. But it will not work.
推荐答案
请按照以下教程来创建语言文件,而不是在填写后再进行跟随:
Follow the following tutorial to create language files, than after filling them do the followihg:
- do ultraclean(功能键+ shift + k)
- 重建
- 删除你的应用
- 再次安装您的应用
- Do ultraclean (function key + shift + k)
- Rebuild
- Remove your app
- Install your app again
这篇关于iOS本地化(Localizable.strings)无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文