Re: diable localization
Re: diable localization
- Subject: Re: diable localization
- From: Georg Seifert <email@hidden>
- Date: Fri, 08 Apr 2011 11:53:18 +0200
Hi,
Many thanks. That worked perfectly.
I need this to allow my users to disable localization.
I use this:
- (IBAction) setDisableLocalization:(id) sender {
if ([sender state] == NSOnState) {
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObject:@"en"] forKey:@"AppleLanguages"];
}
else {
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"AppleLanguages"];
}
}
After a restart all is fine.
Best
Georg
Am 07.04.2011 um 23:58 schrieb Sean McBride:
> On Wed, 6 Apr 2011 09:43:58 +0200, Felix Franz said:
>
>>> I what to give my users the possibility to disable the localization of
>> my app. Is there a way to tell the system (NSBundle?) to always load the
>> english nibs?
>>
>> Just read http://homepage.mac.com/mmalc/Stepwise/Internationalization/
>> it mentions the command line switch:
>>
>> $ /Applications/TextEdit.app/Contents/MacOS/TextEdit -AppleLanguages
>> "(Spanish)"
>>
>> this is a normal default, so
>>
>> $ defaults write com.apple.TextEdit AppleLanguages "(Spanish)"
>>
>> should work, or set the argument/default inside the main function before
>> calling NSApplicationMain
>
> In Xcode, you can also pass -AppleLanguages as an argument to your
> executable. This lets you debug in any language, regardless of your
> preferred languages in System Prefs.
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng email@hidden
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden