Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
356 views
in Technique[技术] by (71.8m points)

ios - How do I change the Development language in Xcode before internationalizing my app?

I'm taking over an app that was written entirely in French. Strings are hardcoded in French in the code, and all the messages in the storyboard are in French. But the initial development region in Info.plist was left to English. So I changed CFBundleDevelopmentRegion to fr so that it matches the real language that was used. But XCode keeps telling me that my Development language is English:

XCode 6.3.2 project Info tab

How can I correct that? The goal is to be able to activate Base Internationalization and have it use French as the Base language instead of English.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The following procedure worked for me, but it includes manually editing project.pbxproj file:

  1. Quit XCode
  2. Open the project.pbxproj file with your favorite text editor
  3. Update the following section (near developmentRegion):

OLD:

    developmentRegion = English;
    hasScannedForEncodings = 0;
    knownRegions = (
        en,
        Base,
    );

NEW:

developmentRegion = fr;
            hasScannedForEncodings = 0;
            knownRegions = (
                fr,
                Base,
            );

I've created a GitHub repository with a sample project that was initially created with English as default Development Language, and then updated by the procedure above to use French as Development Language.

Project ScreenShot


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...