On Tue, Dec 22, 2009 at 11:54 AM, Ricky Sharp <rsh...@mac.com> wrote:
> (1) Have separate nibs for each language.  I agree with those that say you 
> cannot have a one-size-fits-all layout.  Each nib will thus carry layout, 
> font size, style, etc. that makes sense for a particular language.

Luckily this isn't always necessary. But there's no substitute for when it is.

> (2) Externalize all strings from the nibs and put them into 
> Localizable.strings.  This allows me to have a single file to hand off to 
> translators.  I can also group like-items together and fill in nice 
> contextual comments.

This shouldn't be necessary; see man ibtool for arguments you can use
to generate strings files from your nibs automatically.

> (3) For runtime creation of fonts (e.g. boldSystemFontOfSize), call into my 
> special "Font" factory.  I ended up creating a "fonts.plist" localized file.  
> Each version will contain two attributes per key (font size and whether or 
> not its bold).  At runtime, I now read in the appropriate plist and gather 
> the metrics for the fonts I need to create.

Eeeenteresting.

> (4) Leverage my existing automated-test infrastructure to do a full product 
> walkthrough (setting up proper data along the way) and generating 
> screen-shots.  Such screen shots can now be viewed by the localization 
> company's "QA" team to ensure all text is valid within its context.
>
> Furthermore, the "walkthrough" script will mine all text on the screen and 
> look for curly braces.  That will mean that either an outlet isn't connected 
> or its localized string key is either missing or malformed.

Also eeeeenteresting.

> * No plural forms (while allowing plurals can be handled, it's not worth the 
> effort IMO)

Don't cop out with text like "One or more items…" or "There are 5
document(s) open." That looks unprofessional and very un-Mac.

> * No fragmented sentences (i.e. pieces of sentences across multiple UI 
> elements)

Is this going to work in Preference panes? If you're already going the
multiple-nib route, does doing this really pose a problem?

> * No hardcoded ordering of parameters.  i.e. template strings like "Blah {0} 
> blah {1}." may be "{1} blah blah {0}" in other languages.  Each placeholder 
> is always matched to the appropriate vararg argument.

NSString has support for this with the syntax "Blah %1$@ blah %2$@".
Bizarrely, it starts at 1, not 0.

My $0.02.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to