Warning: Parameter 1 to wp_default_styles() expected to be a reference, value given in /homepages/17/d294589954/htdocs/gzlname_c/wp-includes/plugin.php on line 546

Warning: Parameter 1 to wp_default_scripts() expected to be a reference, value given in /homepages/17/d294589954/htdocs/gzlname_c/wp-includes/plugin.php on line 546

Posts tagged ‘languages’

得到用户的首选语言

NSUserDefaults* defs = [NSUserDefaults standardUserDefautls];
//得到用户缺省值
 
NSArray* languages = [defs objectForKey:@"AppleLanguages"];
//在缺省值中找到AppleLanguages, 返回值是一个数组
 
NSString* preferredLang = [languages objectAtIndex:0];
//在得到的数组中的第一个项就是用户的首选语言了