iOS default project language [duplicate] - ios

This question already has an answer here:
Change Single Language of Xcode Project
(1 answer)
Closed 9 years ago.
Quick question. I'm starting a new iOS project in Xcode. The default language (under Localization) is English, but my app is only going to support Portuguese. Should I delete the English entry and add Portuguese ou just leave as it is? Is it bad practice to leave English when my app won't be in English?
Notice that I'm not asking about localization - the app will only run in Portuguese. It's more about setting a default language.
Thanks!

Just don't add any localisation at all.
The en-GB folder is only added if you add localisation.
Just write the app in Portuguese.

If your app is not going to support English anyhow than there is no need of keeping it, So it would be better if you delete it

Related

How to change the language setting of xcode 8.3.3 (swift3) [duplicate]

This question already has an answer here:
How to set language other than English as the development language and Base localization?
(1 answer)
Closed 5 years ago.
I found several topics on this application but none works for me. I would like my Swift3 project in Xcode 8.3.3 to be in French.
1) I added a localization in main page
2) I then change the language in the info.plist file
3) I chose French for my mainStoryBoard
Often I see you need to edit a file but I never have the file mentioned in the tutorial
When I run the simulator I still have the keyboard in English how to change it?
Try this, Change the project language:
You can go to edit schema in project target at the top. And select application language under option tab. Then run the application. It will launch the application in selected language.

Change localizations of base storyboard to german swift xcode

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:
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?
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.
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.

IOS Localizations Global

Its been a couple of years since I worked on IOS, but now that I've created one with the latest Xcode 5.1 I see that there is a "Global" localization. I've always assumed that if the user has a localization that it is not supported by the app, that it will revert to the Localization native development region property in the info.plist.
Has this changed ? and what does the global do exactly ?
Global localization? Do you mean perhaps "Base localization"?
The question is really too broad to answer in the SO format. In short, however: base localization (coupled with auto layout) allows you to you use your reference language (usually your native language) in your storyboards and xibs. When you add a localization to your app, Xcode generates a strings file for all the text that is contained in each UI file.
Good starting point to read up on the new localization guidelines: Apple Developer Internationalization guide

How to translate my iOS App

this is a very basic question. Too basic so I can't find a simple answer.
I have my 'iOS' app in French. I want to translate it in English.
How can I do that ? (I speak English but I don't know what is the protocol in Xcode to create "a dictionnary of the strings" in French/English in my app)
Thanks
You have to use Localization... The tutorial I used and recommend is here: http://www.raywenderlich.com/2876/how-to-localize-an-iphone-app-tutorial
If you are still having trouble check out this answer in stack overflow: How to localize my app with Xcode 4?

How to use a language other than english, but still use NSLocalizedString with english?

I couldn't find any similar questions, so here we go:
I am working on an iOS app that for the first release will only be in french, but we plan to release an english version as well in the future. At this point, I thought it was a good idea to use NSLocalizedString for all the text, so that the app will be ready when the english language will be required. However, I would really like to use english as the key value in my code:
aString = NSLocalizedString(#"Yes", #"Text for positive answer");
instead of
aString = NSLocalizedString(#"Oui", #"Text for positive answer");
Then I want to run genstrings, and localize the .strings file in french (and give it to the translators). But if I do it like that, how can I get rid of the "original" english .strings file? Am I totally wrong here, and do I have to use french for now in my code?
If you are developing the app in English and localizing it into French, I wonder why you would want to actively prevent the app from running in English. If some users in your target market (France only, I imagine?) prefer to run their iOS device in English language, why deny them their preferred language? Or is it because you won't be doing QA of the English version and therefore don't wish to expose it yet?
In any case, I believe that you can restrict the list of supported languages by simply editing your project metadata. In XCode the list of supporting languages is shown on this page -- simply remove English and I believe that your English localizations, even if they are present in your project, won't be used (I haven't tested this but I doubt it would delete your existing English files, it should just remove them from the application's supported languages list)
You can do your whole project in english, keep english words for keys in the localizable.strings files, but keep only the fr.lproj folder, and in the plist set the supported languages only to french.

Resources