Re: Localize Hide / Show menu?
Re: Localize Hide / Show menu?
- Subject: Re: Localize Hide / Show menu?
- From: Stéphane Sudre <email@hidden>
- Date: Mon, 3 Dec 2001 18:12:21 +0100
On Monday, December 3, 2001, at 05:11 PM, email@hidden wrote:
My solution (please don't laugh) is to put the whole string
"Hide something/Show something"
in the menu and then programmatically separate it by components in
validateMenuItem (in particular I assume that the real menu menu items
doesn't contain a slash).
What do you think of that? is there a better solution?
Stupid suggestion:
why don't you just set the complete Menu Item title in your
validateMenuItem method using the NSLocalizedString class of methods ?
I'm using this stupid method and it's just working.
if (action==@selector(jump:))
{
if (visible_==YES)
{
[anItem setTitle:NSLocalizedStringFromTable(@"Hide
something",@"Pingpong",@"Description forthcoming")];
}
else
{
[anItem setTitle:NSLocalizedStringFromTable(@"Show
something",@"Pingpong",@"Description forthcoming")];
}
return YES;
}
or something like this.