internationalization of an iPhone Application

前端 未结 4 1914
夕颜
夕颜 2021-01-27 10:45

I am new to iPhone App development (I am using XCode 4.2) and I was wondering if there is a way to translate all the strings , caption etc ... internally without having to trans

4条回答
  •  悲哀的现实
    2021-01-27 11:05

    You can use NSLocalizedString(@"<#key#>", @"<#comment#>") and one file (named Localizable.strings( per language. If you use the above function you can use the App Linguan (available on the Mac App Store) to generate the Localizable.strings files.

    There is also a command line tool called genstrings that will create the file for you, but believe me that Linguan app will pay for itself in minutes.

    You should always add a comment to allow a better translation and to provide context about the key.

提交回复
热议问题