打印区域设置名称

发布于 2024-10-09 23:31:48 字数 61 浏览 0 评论 0原文

我想知道并打印我在设备上更改的区域设置名称。有什么办法可以打印它们吗?打印 NSLocale 对象没有帮助。

I want to 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等风来 2024-10-16 23:31:48

为您希望单词显示的语言创建一个 NSLocale,然后在 NSLocale 对象上使用 -displayNameForKey:value: 来获取NSLocaleIdentifier 键的显示名称。

此方法的文档有一个示例,可以准确地向您展示您正在寻找的内容。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文