[MacRuby-devel] NSLocalizedString

Eloy Duran eloy.de.enige at gmail.com
Tue Feb 22 09:50:58 PST 2011


Something like this:

module Kernel
  private

  def NSLocalizedString(key, value)
    NSBundle.mainBundle.localizedStringForKey(key, value:value, table:nil)
  end
end

On 21 feb 2011, at 23:56, Charles Steinman wrote:

> On Mon, Feb 21, 2011 at 8:23 AM, Martin Hawkins
> <martin.hawkins at gmail.com> wrote:
>> Changing the line to
>> return NSBundle.mainBundle.localizedStringForKey("Today", value:"Today
>> title string", table:nil)
>> works but NSLocalizedString is supposed to be a Foundation Function,
>> so should be 'freely' available in MacRuby, shouldn't it?
> 
> The trouble is that NSLocalizedString is not actually a function —
> it's a macro, so MacRuby can't call it. It really just needs to be
> reimplemented, but until then the NSBundle methods are precisely
> equivalent.
> 
> — Chuck
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list