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:
- 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
(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. - 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:
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.
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
Swift: Save Video from Nsurl to User Camera Roll
How to Tell If Blocks in Loop All Have Completed Executing
How to Reset the Application Data After Each Test with Xcode 7 UI Testing
How to Create Custom View Programmatically in Swift Having Controls Text Field, Button etc
What Is Container View in iOS 5 Sdk
How to Use Uiviewcontrolleranimatedtransitioning with Uinavigationcontroller
Uitableview Not Visible the Last Cell When Scroll Down
Keep Getting Error Messages When Compiling Newest Version of Admob on iOS6 Sdk
Animate Nav Bar Title Text Change
How to Change the App Store's Large Icon on Itunes Connect
Push/Pop View Controller with Navigation Bar from View Controller Without Navigation Bar
Does Nsthread Create Autoreleasepool Automatically Now
How to Change the Development Language in Xcode Before Internationalizing My App
Tab Bar Background Is Missing on iOS 7.1 After Presenting and Dismissing a View Controller
Xcode: How to Change Layout of Views Between Landscape and Portrait Mode
Archs[@]: Unbound Variable in Xcode 12
Swiftui - How to Get Didset to Fire When Changing a @Published Struct
How to Make a Uitableview in Interface Builder Compatible with a 4 Inch Iphone