Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Selection of Localizable.strings and .strings file naming?

Hi Apple Developer Folks,


In the process of embedding Internalization for strings in my project, I referred to the "InternationalMountains" sample code project.


In that project there are three languages supported, English, French and Chinese.


What I do not understand is why all three Localizable.strings files have been checked in Localization section of the File Inspector.


This is the case for the other two such files, as well.

User uploaded file

(See the full sized image at http://www.drake.org/images/AllThreeBoxes.jpg )


Also, I have one other question: "What is the suggested mechanism for controlling the NAMING of the Localizable.strings files?"


If I wanted to name the files something like "StandardApp.strings" or "ProApp.strings" - where and how would that be accomplished?


As it is, if the files are not named "Localizable.strings" - the NSLocalizedString(key, comment); calls do not work as intended.


Thanks very much!

Xcode-OTHER, iOS 6

Posted on Jan 3, 2013 9:35 AM

Reply
1 reply

Jan 5, 2013 9:49 PM in response to notarysojac

I'm guessing that most use the default naming of the localization strings files, which are packaged with related localized files in the appropriate resource folder - your screenshot is just showing that there are three localizations for that name.


You can use any name you want when creating a strings file - Foundation's NSLocalizedString just uses the default Localizable.string file name by calling NSBundle's localizedStringForKey:value:table: method with a nil value for the table. You can use other names by calling that method or by using Foundation's NSLocalizedStringFromTable, passing the desired table name (the file to use).

Selection of Localizable.strings and .strings file naming?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.