Well, I'm not sure.

I only use AppleLanguages for debug. I'm setting the argument in the launch 
argument in Xcode. I think  that your method can work. Perhaps you can even set 
the defaults in the beginning of the application [NSUserDefaults 
registerDefaults:], but I think it must be very early in the launch process 
(before mainNib is loaded?).

But frankly, I don't see why you have to do this. If you want your application 
to run in sk (slovak?) then leave only this lproj in your app.

Frédéric

PS: sorry, I read one more time. If it's an option left to the user your method 
can be correct. registerDefaults would not be useful.

Le 18 mai 2010 à 22:37, Gustavo Pizano a écrit :

> So at app start up I can get the Application defaults objectforkey 
> "AppleLanguages", then set array with the first object to be "sk_SK" and then 
> push the array again back to the application defaults.. right?
> 
> And if the user selects for example English I must do the above, and restart 
> the application to load the proper language... correct me if Im wrong 
> please... 
> 
> thx
> 
> Gustavo
> 
> On 18.5.2010, at 21:13, Frédéric Testuz wrote:
> 
>> Le 18 mai 2010 à 18:28, Joanna Carter a écrit :
>> 
>>> Hi Gustavo
>>> 
>>>> In this case.. is tehre anyway to let teh user choose what lang to use?.. 
>>>> I mean if I localize my app, but the user has no localization either, how 
>>>> to make the app run in a given language (i.e sk)?
>>> 
>>> The only way I can think of is to delete the other localizations from the 
>>> bundle. Maybe someone else knows better :-)
>> 
>> You can launch the application with AppleLanguages in the arguments or in 
>> the app defaults.
>> 
>> See :
>> 
>> <http://www.cocoabuilder.com/archive/cocoa/3862-changing-language-at-runtime.html?q=applelanguages#3861>
>> 
>> and
>> 
>> <http://www.cocoabuilder.com/archive/search/1?q=applelanguages&l=cocoa>
>> 
>> Frédéric
> 

_______________________________________________

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