• 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
Localization - NSBundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Localization - NSBundle


  • Subject: Localization - NSBundle
  • From: Simon Wright <email@hidden>
  • Date: Mon, 31 Dec 2001 16:32:10 -0500

I'm trying to localize my app and have partially succeeded. In my project,
under the Groups & Files section, I have...

MainMenu.nib showing two variants: English and French
InfoPlist.strings showing two variants: English and French

these two were created automatically when I selected Add Localized Variant from the Localizations & Platforms popup menu in the Show Info window.

I also have...

Localizable.strings showing two variants: English and French

I created the first one (English) manually and then the French one using the same method as above and then translated the strings.

When I choose French as my preferred language in the International System Preference I get the french version of my nib but I am not getting the french version of my strings in code.

In my code I have...

NSBundle myBundle = NSBundle.mainBundle();

and then reference my strings thusly...

myBundle.localizedString("StringKey")

I've also tried...

myBundle.localizedStringForKey("StringKey","","")

but they both return the English versions of my strings.

In Targets, Bundle Resources I do see all three files each showing with 2 variants.

Any ideas?

TIA.

Happy New year!

Simon


  • Prev by Date: Re: Translating filenames for command line?
  • Next by Date: Re: Lists as newsgroups (or: give chuq more work!)
  • Previous by thread: Re: That Cocoa Book...
  • Next by thread: How to work out if a font supports a character?
  • Index(es):
    • Date
    • Thread