How to Change the Development Language in Xcode Before Internationalizing My App

How to set language other than English as the development language and Base localization?

Your understanding is mostly correct. One small clarification: if the user is running in some third language, like Russian, it is not necessarily true that the app will run in English. Instead, the app will run in the first language it supports that the user prefers. As of iOS 8 and later, users can have a list of preferred languages, such as "Russian, French, Chinese, English". In the case of this hypothetical user, the app would actually run in Chinese, since it is earlier in the list than English.

To answer your question regarding changing the development language, this isn't straightforward to do but can be done. Specifically:

  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 (as you observed), 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:

Project info

File info

My mac app does not change its language even after changing the Development Region on Xcode

On macOS app, you change the localization language from Edit Scheme -> Run -> App Language, which is located under the app name on the status bar. It is irrelevant to change the content on project.pbxproj.

Sample Image



UPDATE

Hmmm.. this seems to not work in French for some reasons. But it works in Chinese, Japanese, and Korean.

IOS: set a default language in xcode for my app

SOLVED!!!

you should set "base" in in plist file section:

Localization native development region

and set Storyboard only for "base"; for other language only in Localizable String

when you localize a file you should set base (for language default) and the other language you want to use.

In localizations (picture in my question) should be with base and all language you want to use

Localization in Swift, Base, German, English, what's the correct way to do it?

I think you should set the base language to English, add German for additional languages, so the APP for any users uses German on the phone will display German. Otherwise, the APP for all users who do not use German will display the base language, which is English. I hope this will help you.

Check this to set up the development language on XCode.



Related Topics



Leave a reply



Submit