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                 s...@rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
> 
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to