2

I have an App which is nearly done and I only need to add localizations to it. The problem is that I have written it completely in German (because I am from Germany) and I don't have changed the development language. That means xCode thinks that everything I have done is written in English and not in German: enter image description here

I have tried to set the CFBundleDevelopmentRegion to German and also to set the Localization native development region (in target) to german but nothing worked.

So my basic question is: I have an app written in German and how can I add an English and maybe other language support?

4
  • I have the same problem but with Polish language. Did You changed it? Jan 29, 2016 at 10:19
  • I don't changed the Development language because it doesn't worked. I finally found out that you can click on the localized String file and then in the File inspector add also a File for German/ Polish and then change the strings in that one and just let the German one be itself.
    – M. Kremer
    Jan 29, 2016 at 13:42
  • I just find a way to make it work but thanks for Your reply. If I had more time I will write an answer but in general You have to edit one file in Your project outside the xCode 7 Jan 29, 2016 at 14:01
  • This would be nice because the next project is coming :)
    – M. Kremer
    Jan 29, 2016 at 14:34

1 Answer 1

8

I was fighting with this for a long time but finally I think I found a solution for Xcode 7.

In general If you're developing language is different than English you have to make 2 things. After you create a new project in Xcode 7 quit Xcode and go to the terminal.

Edit the file in your project folder with your favorite text editor:

vi <your_project_name>.xcodeproj/project.pbxproj

Search for the key: knownRegions. You should find something similar to:

knownRegions = (
  pl,
  Base,
);

Put your development language code on the first position. In general position is not important but I prefer that my native language be first. In Your case put there de. By default the first language in new project is en.

Next you should look for developmentRegion (in the same file) and change its value to “Polish" or whatever language you are using. In your case "Germany". What I noticed this makes Xcode to notice that your Development Language changes from English (default) to your language. After those changes save and exit text editor. Start the Xcode and point your eyes to Project -> Info tab. You should see something similar to this with Your native language set as Development Language.

enter image description here

Now open Info.plist. Edit the CFBundleDevelopmentRegion key and set its value to pl or de in your case.

Thats all. Now Your Base.lproj can contain resources in your native language. If you want a new Language just add it as usual.

Let me know if it working for you. I don't know how this little trick change your current project with existing translations but this is good point if you're starting new project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.