Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: NSLocalizedString in interface builder?

Is there any way to insert an NSLocalizedString in interface builder. For example set a label text to a localized string instead of a static string?

I really hate to create a property for every single item that requires a localized string.

like image 337
aryaxt Avatar asked Nov 02 '10 16:11

aryaxt


People also ask

What does NSLocalizedString do?

NSLocalizedString provides string localization in “compile-once / run everywhere” fashion, replacing all localized strings with their respective translation according to the string tables of the user settings.

What is non localized text?

Nonlocalized strings are text that appears in your interface that Xcode won't include in exported files. To find nonlocalized stings in your app, choose Product > Scheme > Edit Scheme in Xcode.

What is Nslocalized string?

Returns a localized version of a string from the default table, which Xcode autogenerates when exporting localizations.

How do I create a localizable string in Xcode?

Recent versions of XCode doesn't create Localizable. strings file by default. To add Localizable. strings file, go to File->New->File , choose Strings File under Resource tab of iOS, name it Localizable.


2 Answers

This post might have some tips for you:

http://blog.wilshipley.com/2009/10/pimp-my-code-part-17-lost-in.html

like image 115
nevan king Avatar answered Oct 19 '22 07:10

nevan king


Even if this post is old, for those interested in automatically localizing your IB files, check this out: https://github.com/angelolloqui/AGi18n

DISCLAIMER: I am the developer of the library

like image 2
Angel G. Olloqui Avatar answered Oct 19 '22 07:10

Angel G. Olloqui