Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
354 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...