在Cocoa应用中使用特定的本地化 [英] Use specific localization in Cocoa app

查看:116
本文介绍了在Cocoa应用中使用特定的本地化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使您的可可应用使用与当前语言环境不同的特定语言环境/本地化?

How can you make your cocoa app use a specific locale / localization thats different from what the current locale says?

我的应用具有多个本地化版本,喜欢能够选择应用程序在配置文件中使用的本地化。如何告诉Cocoa要使用哪些本地化?

My app has a number of localizations and I would like to be able to choose the localization the app uses in a config file. How can I tell Cocoa which of the localizations to use?

推荐答案

嗯,可能是AppleLocale期望en一个en_US?

Hmmm could it be that AppleLocale expects an 'en' and not an "en_US"?

'en'在终端中为我工作,所以...我不明白为什么它不应该是相同的字符串在这里为你以及在您的应用中设置时

'en' works for me in the terminal so... I don't see why it should not be the same string here for you as well when setting it in your app

默认值为com.mycompany.myproduct AppleLocale'en'

defaults write com.mycompany.myproduct AppleLocale 'en'

这篇关于在Cocoa应用中使用特定的本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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