• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [NEWBIE] How to localize toolbar button?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NEWBIE] How to localize toolbar button?


  • Subject: Re: [NEWBIE] How to localize toolbar button?
  • From: Kristofer Szymanski <email@hidden>
  • Date: Tue, 12 Oct 2004 05:50:08 +0200


Sorry, "Button01" of course:

set title of button "TestButton" of window "Main" to (call method "localizedStringForKey:fromTable:" with parameters {"Button01", "Localized"})

/ Kristofer

On 2004-10-12, at 05.44, John Stiles wrote:

"Button1" isn't the same string as "Button01". Which is it?



On Oct 11, 2004, at 8:40 PM, Kristofer Szymanski wrote:


Thanks for the link. Everything seems to be ok in my app but

NSLocalizedString(@"Button01",@"")];

still sets the name of the button to "Button1"

I tried to use AppleScript:

set title of button "TestButton" of window "Main" to (call method "localizedStringForKey:fromTable:" with parameters {"Button1", "Localized"})

to set the name of aother button in the window (not in the toolbar) and it is working.

/ Kristofer

On 2004-10-12, at 04.44, john c. warner wrote:

I think your .strings file is formatted incorrectly. See <http://developer.apple.com/documentation/MacOSX/Conceptual/ BPInternational/index.html>

-John


Kristofer Szymanski wrote:
Unfortunately this sets the name of the button to "Button01" not to "Programinställningar" :-(
/ Kristofer
On 2004-10-12, at 04.10, Clark Cox wrote:
On Tue, 12 Oct 2004 03:43:03 +0200, Kristofer Szymanski
<email@hidden> wrote:


Hello,

I am trying to localize my application and I wonder how can I set the
name of the button to a name specified in Localized.strings file:

/* Swedish - the preferences button. */
"Button01" = "Programinställningar";

right now I am using:

[item setLabel:@"Preferences"];

to specify the name of the button.


Change that to:

[item setLabel: NSLocalizedString(@"Button01",@"")];


--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >[NEWBIE] How to localize toolbar button? (From: Kristofer Szymanski <email@hidden>)
 >Re: [NEWBIE] How to localize toolbar button? (From: Clark Cox <email@hidden>)
 >Re: [NEWBIE] How to localize toolbar button? (From: Kristofer Szymanski <email@hidden>)
 >Re: [NEWBIE] How to localize toolbar button? (From: "john c. warner" <email@hidden>)
 >Re: [NEWBIE] How to localize toolbar button? (From: Kristofer Szymanski <email@hidden>)
 >Re: [NEWBIE] How to localize toolbar button? (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Does anybody program in Java?!?!
  • Next by Date: Re: NSTextField or NSTextView for this job?
  • Previous by thread: Re: [NEWBIE] How to localize toolbar button?
  • Next by thread: Re: [NEWBIE] How to localize toolbar button?
  • Index(es):
    • Date
    • Thread