小编Gus*_*all的帖子

如何在iOS模拟器中设置特定语言?

到目前为止我做到了这一点:

Imgur

但我仍然将语言设置为英语:

在此输入图像描述

有谁知道我错过了什么?


编辑:

如果我这样做:

- (void)logAllLocales
{
   NSLocale *curentLocale = [NSLocale currentLocale];
   NSArray *locales = [[NSLocale availableLocaleIdentifiers] sortedArrayUsingSelector:@selector(compare:)];
   for (NSString *locale in locales)
   NSLog(@"locale '%@' is: %@'", locale, [curentLocale displayNameForKey:NSLocaleIdentifier value:locale]);
}
Run Code Online (Sandbox Code Playgroud)

结果:

'sv'是:瑞典人'

'sv_FI'是:瑞典语(芬兰)'

'sv_SE'是:瑞典语(瑞典)'

我会得到三个瑞典语区域选项,所以技术上"sv"应该这样做.但我也没有运气测试其他选项.

但是如果simultor需要重置来改变Lanugage那么我认为我的问题是回答.在启动时传入的参数是不可能的.=)

objective-c ios ios-simulator

4
推荐指数
1
解决办法
6584
查看次数

标签 统计

ios ×1

ios-simulator ×1

objective-c ×1