views:

44

answers:

1

In Android I put my application strings in a file called strings.xml. For example, for an Italian translation I need to create a values-it folder and put a strings.xml file with Italian labels inside this new folder.

How does Monotouch manage such internationalization of strings?

+1  A: 

You would generally use Apple's localization features - special "lproj" folders in your app bundle containing localized versions of your nibs, files, string resources etc.

You can find more info in Apple's iOS Internationalization docs, and there are also some third-party tutorials that are useful.

Although MonoDevelop does not provide any explicit support for localization, simply adding the lproj folders to your project root and marking their contents as "Content" should add them into the app bundle properly.

Any resource you load from the bundle should then load the appropriate localized version, if present. This includes APIs that automatically load items from the bundle, such as instantiating views from xibs/nibs, and also APIs to explicit retrieve resources from the bundle. For example NSBundle.LocalizedString will load the appropriate string from your strings resources.

mhutch
+1 Great answer, should be upvoted more.
Yar