Localization 本地化不';不影响某些.strings文件

Localization 本地化不';不影响某些.strings文件,localization,xcode4.2,nslocalizedstring,localizable.strings,Localization,Xcode4.2,Nslocalizedstring,Localizable.strings,我在项目中使用SORelativeDateTransformer 我本地化了我的项目(翻译了故事板并创建了Localizable.strings(我使用了NSLocalizedString)),这部分翻译得非常完美 问题是SORelativeDateTransformer使用自己的SORelativeDateTransformer.strings(使用NSLocalizedStringFromTable), 它在演示中起作用,但在我的项目中不起作用 Upd:我还发现我翻译成挪威语的一些标签保留了

我在项目中使用SORelativeDateTransformer

我本地化了我的项目(翻译了故事板并创建了Localizable.strings(我使用了NSLocalizedString)),这部分翻译得非常完美

问题是SORelativeDateTransformer使用自己的SORelativeDateTransformer.strings(使用NSLocalizedStringFromTable), 它在演示中起作用,但在我的项目中不起作用

Upd:我还发现我翻译成挪威语的一些标签保留了英语单词。啊


有什么想法吗?

我知道这个问题很老了,但我用了一个解决方案。有一种方法可以根据您的偏好强制SORelativeDateTransformer加载特定的本地化字符串。如果手动安装而不是使用pod,则可以根据您的偏好编辑.m。例如,这就是我在+(NSBundle*)bundle方法中实现它的方式

+ (NSBundle *)bundle {
static NSBundle *bundle = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
    NSString *systemLanguage = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];//you can use conditional statement after here to load a specific bundle since you now have you language codes here (e.g. 'en' for English, 'zh-Hans' for Chinese (Simplified) etc) 
    NSURL *url = [[NSBundle mainBundle] URLForResource:@"SORelativeDateTransformer" withExtension:@"bundle"];
    bundle = [[NSBundle alloc] initWithURL:url];
    NSString *path = [bundle pathForResource:systemLanguage ofType:@"lproj"];
    bundle = [NSBundle bundleWithPath:path];
});
return bundle;
}

这应该可以解决问题。

你找到解决办法了吗?谢谢你回复我。您现在使用的任何其他库我都可以使用吗?@saintjab抱歉没有帮助。不,我记得我刚刚将SORelativeDateTransformer.strings中的字符串复制到Localizable.strings,并将该项目中的所有NSLocalizedStringFromTable调用替换为NSLocalizedStrings。我刚刚发布了一个基于我的更新作为答案。谢谢你的帮助。