Changing the development language in Xcode

后端 未结 5 739
不知归路
不知归路 2020-11-28 03:55

I need to set Spanish as development language for an iOS app. I\'m already using Xcode 6, and I changed the Localization native development region entry in app\

相关标签:
5条回答
  • 2020-11-28 04:39

    In your project's .xcodeproj file, search for the string developmentRegion. Supposedly, it says "English" right now. If you change it to "Spanish", Xcode 6 should recognize Spanish as your project's default localization language in the "Info" tab as long as you add "Spanish" to the list.

    You can read more about this topic at http://eschatologist.net/blog/?p=224

    0 讨论(0)
  • 2020-11-28 04:43

    Here's how you can do this:

    1. Add the language you want to be your Base language first. Uncheck all of the files that Xcode offers to localize for you.
    2. In the Info.plist, change the development region to the language that you want to be your base language. Note that the property is a bit misnamed, because its value should be a language code (with an optional country code), rather than a region or country code.
    3. Close your project in Xcode. In another code editor, open projectname.xcodeproj/project.pbxproj and search for developmentRegion. You should see a line like developmentRegion = English;. Change this to reference the same language you put in your Info.plist file.
    4. Reopen the project in Xcode. Go through all your localizable files and check the boxes next to English to generate the localizable resources. Note that for storyboards and xibs, Xcode might create a storyboard instead of a strings file. If that happens, just change the filetype to strings file.

    Here's an example of the result for me using fr as the Base language:

    0 讨论(0)
  • 2020-11-28 04:47

    For Xcode 9 through 11:

    Close Xcode.

    1. Open your project.pbxproj in a text editor
    2. Look for developmentRegion and set its value (es for spanish, fr for french,...)
    3. Look for knownRegions and add the new language to the list

    Open Xcode: Your project info should now show the language name with Development Language next to it.

    0 讨论(0)
  • 2020-11-28 04:53

    For someone that needs help like I did, I have two targets, one I want to be EN Base localization and second target I need to be another language. The option mention above: "change projectname.xcodeproj/project.pbxproj and search for developmentRegion and change ..." doesn't work for me because of targets.

    What worked for me, Xcode 11.5, is that only I need to change the language code in the "Localization native development region" for that particular target and it works, no need to change anything in projectname.xcodeproj/project.pbxproj P.S. Here "Localization native development region" must go country code like fr_Fr or in my case hr for Croatian

    0 讨论(0)
  • 2020-11-28 04:55

    open your target -> info -> change "Localization native development region" to your language

    0 讨论(0)
提交回复
热议问题