开发者

Printing the locale names

开发者 https://www.devze.com 2023-02-01 11:12 出处:网络
I want t开发者_StackOverflowo know and print the locale names which I am changing on my device. Is there any way to print them. Printing a NSLocale object does not help.Create an NSLocale for the lang

I want t开发者_StackOverflowo know and print the locale names which I am changing on my device. Is there any way to print them. Printing a NSLocale object does not help.


Create an NSLocale for the language in which you want the words to appear, then use -displayNameForKey:value: on the NSLocale object to get the display name for the NSLocaleIdentifier key.

The documentation for this method has an example that shows you exactly what you're looking for.

0

精彩评论

暂无评论...
验证码 换一张
取 消