Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the app language




On 28.07.2007, at 00:12, Jeff Bland wrote:
As for comment headers in string files I thought that was the point of the
comment field in
"NSString<http://developer.apple.com/documentation/Cocoa/Reference/ Foundation/Classes/NSString_Class/Reference/NSString.html#// apple_ref/doc/c_ref/NSString>*NSLocalizedString(

No, the comment is only used by the tool that extracts the NSLocalizedString() keys and builds "template" .strings files. They're actually ignored by the app itself. The intended workflow is AFAIK:


- create your app in English
- wrap all English strings in NSLocalizedString() calls
- Run a command line tool (genstrings?) over all your source files. It'll generate .strings files containing the English text as keys and values, plus any comments you specified as comments in the .strings files
- Have your translators copy these files and localize them. The comments are intended to provide helpful context for your (human) translators, not for the computer. E.g. if you have a string "%d elements" you could have a comment saying "This is part of the string 'Do you really want to delete N elements/this element?'", so your translators know that this will be inserted as the %@ in the 'do you really want to delete %@?' string they just translated, and has to fit with that grammatically.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden
References: 
 >Changing the app language (From: "Jeff Bland" <email@hidden>)
 >Re: Changing the app language (From: Douglas Davidson <email@hidden>)
 >Re: Changing the app language (From: "Jeff Bland" <email@hidden>)
 >Re: Changing the app language (From: Brian Willoughby <email@hidden>)
 >Re: Changing the app language (From: "Jeff Bland" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.