Changing the development language in Xcode
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's Info.plist
(CFBundleDevelopmentRegion
) from "en" to "es". However, in Project > Info > Localizations, English remains set as Development Language.
As said in Information Property List Key Reference, CFBundleDevelopmentRegion
specifies the default language. I need to set Spanish to the default language, what am I missing?
Thanks
Solution 1:
Here's how you can do this:
- Add the language you want to be your Base language first. Uncheck all of the files that Xcode offers to localize for you.
- 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. - Close your project in Xcode. In another code editor, open
projectname.xcodeproj/project.pbxproj
and search fordevelopmentRegion
. You should see a line likedevelopmentRegion = English;
. Change this to reference the same language you put in yourInfo.plist
file. - 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:
Solution 2:
For Xcode 9 through 13:
Close Xcode.
- Open your project.pbxproj in a text editor
- Look for developmentRegion and set its value (es for spanish, fr for french,...)
- 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.
Solution 3:
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
Solution 4:
open your target -> info -> change "Localization native development region" to your language