iOS本地化不起作用 [英] Ios Localization not working
问题描述
我正在运行XCode版本4.3.3和iOS 5.1. 我可以做我想做的.我无法运行本地化.我通过项目文件添加了不同的语言.我用以下每种语言调整了InfoPlist.strings:
I have XCode Version 4.3.3 running and iOS 5.1. i can do what i want. i can't get localization running. i added different languages through project files. I adjusted the InfoPlist.strings in every Language like this:
"key" = "value";
我到处都有:
NSLocalizedString(@"key", nil);
没有键与其值相同.我已经检查了选择哪种语言:
No key is the same like its value. I have checked the which language is chosen:
NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
但是当我运行该应用程序时,该应用程序始终只显示键,而没有任何值.
我没有想法
我尝试按照此处所述删除和清理所有内容: 本地化不起作用
But the app constantly just shows the keys and no value when i run the App.
I ran out of ideas
I tried deleting and cleaning everything as described here: Localization not working
我尝试复制此处描述的文件: NSLocalizedString问题
I tried copying the files described here: NSLocalizedString Problem
所有文件都在其语言文件夹中: iPhone:NSLocalizedString甚至从英语.strings文件中读取设置其他语言时
And all the files are in their language folder: iPhone: NSLocalizedString reading from English .strings file even when another lang is set
有人知道我还能做什么吗?!?我不知道我在做什么错?!
Does anybody have an idea what else i can do?!? i don't know what i am doing wrong?!
推荐答案
您是否有Localizable.strings文件?这是
Do you have a Localizable.strings file? That's the default file that
NSLocalizedString(@"key", nil);
寻找.
这篇关于iOS本地化不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!