Re: How to switch language (nib)
Re: How to switch language (nib)
- Subject: Re: How to switch language (nib)
- From: publiclook <email@hidden>
- Date: Tue, 28 Oct 2003 18:07:21 -0500
Paraphrased from "Cocoa Programming" page 181:
Default values specified on the command line Supersede all other
defaults. Default values are specified on the command line and added to
the argument by preceding a default name with a hyphen and following it
with a value. For example, adding the following argument to the command
line when launching a Cocoa application will change the default units
of measurement used by the application during that session:
-NSMeasurementUnit Inches
Even if the users default value set with Apples System Preferences
application is
Centimeters, running an application from the command line and
specifying
Inches will supercede the default value for one execution session.
The trick to using these command line arguments is knowing the default
name. To force an application to use a particular language
superseding
to the users normally preferred language, I think the key you want is
AppleLanguages. To force a particular session with an application to
run in german if possible and only try French if German doesn't work
and finally fall back on English, use -AppleLanguages "(German,
French,
English)" as command line arguments. The quotes are important so the
shell does not interpret the parentheses.
Example:
/Applications/TextEdit.app/Contents/MacOS/TextEdit -AppleLanguages "(
German, French, English )"
I found this answer by searching for language AND command AND line AND
argument at
http://cocoa.mamasam.com/search/results.php. It was the
first hit.
On Tuesday, October 28, 2003, at 03:27 PM, Seaside wrote:
Yes, shure!
But if a user would like to switch within ONE application to
another language... May the application switch itself?
Am Dienstag, 28.10.03 um 21:17 Uhr schrieb Finlay Dobbie:
On 28 Oct 2003, at 19:16, Seaside wrote:
How do I integrate a feature, which allows the user to switch his
localized nib file from English (default language) to Spanish?
Users determine their language preferences in the International pane
of the System Preferences application.
-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.