• 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
Important Localization Change in WO 5.4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Important Localization Change in WO 5.4


  • Subject: Important Localization Change in WO 5.4
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 21 Oct 2008 15:25:41 -0700

Hi,

If you are using Wonder localization (and all the cool kids are) you can probably ignore this. If you are using WOResourceManager, then read on...

Unless I missed something (always a possibility!), there has been a substantial change in 5.4 that has not been documented.

According to the WOResourceManager documentation for stringForKey:

Searches aTableName using aKey to find a localized string ... the search then continues to the aTableName file (if it exists) directly under the Resources directory (inside the directory with the .woa extension).


This is no longer the case. It now looks in Default.lproj. This folder does _not_ get flattened in the built bundle. In previous versions, the resources in Nonlocalized.lproj were flattened into Resources/ in the built bundle. This old mechanism now breaks localization: if a resource is found directly under Resources/ is it used and localized versions are not considered.

Also, NSBundle still looks in Nonlocalized.lproj (instead of Default.lproj) so it is not compatible with how WOResourceManager now works. An example application demonstrating the problems is attached.

To update your projects, rename Nonlocalized.lproj to Default.lproj. If you had resources directly under Resources/ that had localized counter parts, create a Default.lproj directory and move them there.


I have filed a bug with Apple with these suggested fixes:

1. Update the documentation, make publish a tech note calling this out.

2. Fix bug so that if legacy Nonlocalized.lproj is used (with built resources at top Resources/ level) it does not hide localized files

3. Update NSBundle to look in Default.lproj as well

Chuck


Attachment: LocalizationTest.tgz
Description: Binary data





-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







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

This email sent to email@hidden

  • Follow-Ups:
    • Re: Important Localization Change in WO 5.4
      • From: Q <email@hidden>
  • Prev by Date: help - subcomponent won't update
  • Next by Date: Re: eclipse debugging help
  • Previous by thread: Re: help - subcomponent won't update
  • Next by thread: Re: Important Localization Change in WO 5.4
  • Index(es):
    • Date
    • Thread