iPhone本地化 - 获取手机的语言代码? [英] iPhone Localization - Get the phone's language code?

查看:163
本文介绍了iPhone本地化 - 获取手机的语言代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为多种语言本地化我的iPhone应用程序,除了更改一些字符串,我需要更改一些背景。是否可以查询iPhone并获取用户的语言代码?

I'm localizing my iPhone app for multiple languages, and in addition to changing some of the strings I need to change some backgrounds. Is it possible to query the iPhone and get the user's language code?

谢谢!

推荐答案

看看NSLocale:

Take a look at NSLocale:

NSString   *language = [[NSLocale currentLocale] objectForKey: NSLocaleLanguageCode];
NSString   *countryCode = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode];

这篇关于iPhone本地化 - 获取手机的语言代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆