【问题标题】:NSLocalizedStringFromTableInBundle : not getting values for keyNSLocalizedStringFromTableInBundle :没有获取键的值
【发布时间】:2012-10-23 10:34:18
【问题描述】:

我无法从InfoPlist 获得keysvalues

label.text = NSLocalizedStringFromTableInBundle(@"keyone", 
                                                nil, 
                                                AppDelegateObj.langBundle, nil));

InfoPlist.strings中有一个值

"keyone" = "value one";

当我运行我的应用程序时,它会将UILabel 值显示为 keyone

为什么?

【问题讨论】:

    标签: ios iphone nslocalizedstring localizable.strings


    【解决方案1】:

    试试这个:

    label.text = NSLocalizedStringFromTableInBundle(@"keyone", 
                     @"InfoPlist", 
                     AppDelegateObj.langBundle, nil));
    

    【讨论】:

    • 永远不要忘记表名等于本地化文件名:P
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-08
    • 2019-06-05
    • 2013-04-04
    • 1970-01-01
    • 2019-12-20
    相关资源
    最近更新 更多