How to set base language other than English in iPhone app? - iphone

I am implementing an app which is going to have localization.
But in this case I need to set base language as Portuguese and not English
While implementation my app is going to be in English and after that when i change settings to language Portuguese it will show in that language,
but
User is going to change the language from app itself and should be able to switch the language

In plist file set "Localization native development region " set "German".
u want to set German.
Must have German Localize string file.

What do you mean by "set the base language"?
The app will launch in whatever language the user has his device set to use. If I set the language on my phone to English the app will launch in English. If I set the language of my device to Portuguese the app will launch in Portuguese. If you don't want it to be able to launch in English, don't add localization support for English.
Edit
I see what your intention is now. Yes, you can use the "AppleLanguages" preference, like so:
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:#"en", #"pr", nil] forKey:#"AppleLanguages"];
This will make English the primary language of your app, and if an English translation is not available for a string then it will check the next language in the array for a translation.

Related

How to modify/localize "This app does not have access to.." privacy message

If I revoke the app's access permission to my photos, I get this, even if my device language isn't English:
Is there a way to localize this message?
I haven't found a suitable key to set in plist file.
The message is localized automatically by the system. There's no way for you to localize it.
Your app has to have a localization for the language you want for the message to be shown in that language.
If your app has a French localization, and your system setting is French, the message will appear in French. But if your app isn't localized for French, the message appears in the base language for the app (usually English), despite the system language being set to French.
this is os view and is dependent on ur device's selected language

Change App Name If iPad Change Language Setting

I am making a bilingual app thai is English and Korean language.
Now, I want my app to change its name whenever the user change the language setting of the device. It the language is set to English the app name is english, and if it in Korean the app name will change to korean.
i know it is possible, because i've seen some apps like that.
How will i able to do it?
Thanks!
Go to infoPlist.Strings File
Write
CFBundleDisplayName = "Your App Name In Particular Language";
Add the Localization of the file in property

How to test localization "portuguese brazil"?

I wonder How to trigger the localization language portuguese-brazil in iphone? (or simulator is all right)?
that's, how can I test Portuguese-Brazil localization on iphone?
I found there's only Portuguese and Portuguese(Portugal) in the international setting but unfortunately neither could be the answer.
Thanks in advance
Well, I am Portuguese, to trigger those, you should put the language as Portuguese. If it's not working on your case, might be a problem related with the code. Try doing the following:
Keep only 1 version of the Localized.strings file as the Portuguese version, remove everything else (just for testing).
Ok, i had the same problem and i just solved it.
Use "Portuguese" instead "Portuguese-Brazil" in your project, and your Portuguese language of device should work fine.
Here is the problem:
I was trying to set the portuguese language with Portuguese-Brazil at the "+" when i selected the project file, and when i changed my device and my simulator (used both to test) language to portuguese (once there is no portuguese-brazil), the text was coming from the default language (english), what means it was not working.
I tried deleting "Portuguese-Brazil" and adding "Portuguese", and it worked when i changed my devices to portuguese language;
I think that is a bug in XCode, that language "Portuguese-Brazil", since the device has no language like that in Settings > General > International> Language of devices, only "Portuguese"
Maybe you're looking at the wrong setting. To change the language in iOS, go to Settings > General > International > Language. There is also Settings > General > International > Region Format but this setting controls things such as date, time and number formats (i.e. locale formats, not localization)
When you change the Language setting, even in the simulator, you will see that the iOS user interface will have changed to the new language. If you then launch your app and you don't see it localized as you expect (assuming that of course you added the localized resources in that language), then something is wrong!

Localized app description does not appear on the App Store

I have a new iPhone app up on the App Store. This app has been fully localized into English and German. German is the native language of this app.
I added the English App Store description, added localized screenshots (and entered an English name for this app) in iTunes Connect ("Manage Localizations" - "Add Localization")
Unfortunately this translation does not appear on the App Store. Even in the UK and US App Store, there's always the German version of the app description.
This is not my first (localized) app which is available on the App Store ... but in this case, I have absolutely now idea what I'm doing (or what I did) wrong.
My app is called "ÖPNV-Navi" (the localized English title is "PT Guide"):
http://itunes.apple.com/gb/app/opnv-navi/id455704043?mt=8 (UK Store)
http://itunes.apple.com/us/app/opnv-navi/id455704043?mt=8 (US Store)
http://itunes.apple.com/de/app/opnv-navi/id455704043?mt=8 (German Store)
Any idea?
Because your default language is German (This setting in iTunesConnect can NOT be changed once you submitted an App), if the iTunes can't find the localized description for the user's system language, it will display your default language instead.
As I've mentioned before, the language is not depend on the country of App Store but the user's system language settings, in my Mac which use English as its system language, I can see your English description in US Store. But in UK Store, since I am not using UK English as my system language, I got your default language: German.
If you change your Mac's system language into English, you will see your English description in US Store.
In addition, the most weird thing is the localized descriptions are bound to the specific country of App Store.
What dose this mean?
It means even you've created an English description in iTunes Connect, and the user do have English as his/her system language, but if he/she is NOT watching the US App Store, he/she will NOT get the English description but your default language, German.
What a confusing situation, what a "great" system, right?
My problem was that I also did not see the localized description in the app store.
The solution was that both the system language (in iOS or OS X) AND the app store country should be according to the language you want.
Localize App Store information
After you add an app to your account, you can add languages and enter localized information about your app that appears on the App Store. For a list of the languages and locales you can localize app metadata for, see App Store localizations. For the properties you can localize, see Required, localizable, and editable properties.
For example, if the primary language is set as English, the information in all App Store territories appears in English. If you add French to your app and localize the text, keywords, and screenshots, users whose language setting is French, see the French localization. Users who are located in a territory that includes French, but not English, as a supported language, also see the French localization. Users can also search for your app in all French-language App Stores using the localized keywords. In other App Store territories, users see the information in the primary language (English in this example).
The user’s language setting on the device controls which localization appears on the App Store. If there’s no localization available that matches the language, the next closest localization is used. If you want locale-specific metadata to appear, add a language for a specific locale to your app—for example, add French (Canada). The Apple Store URL for your app is the same, regardless of the user’s device language settings.
The languages you add to an app in iTunes Connect are not the same as the languages you add to your app in Xcode. The languages that you add in Xcode appear under Languages on the App Store. To localize your app binary, read Internationalization and Localization Guide.
iTunes Connet help:
en: https://help.apple.com/itunes-connect/developer/?lang=en#/deve6f78a8e2
中文: https://help.apple.com/itunes-connect/developer/?lang=cn#/deve6f78a8e2

iPhone Localization without English

I have an app that's only supported in Dutch and French. English is not an available language for this app.
If I want to use localizable strings, the default always gets set on English. I want this to be dutch.
So what I did was use the English localizable strings file and fill it up with dutch words. Only problem I have is that it shows English as a supported Language in the App Store. Is there any way to change the default Localizable Strings file to Dutch so that the only two languages that show up are Dutch and French?
Thanks in advance,
Lewion
You should rename the folder where your dutch files lay in from en.lproj to nl.lproj. Everything should still work then but the language will get recognized correctly. You may have to tell Xcode about the new location of the files.
[[NSUserDefaults standardUserDefaults]
setObject:[NSDictionary
dictionaryWithObject:[NSArray arrayWithObjects:#"nl", nil]
forKey:#"AppleLanguages"]];
That will make Dutch the default language.
Create Dutch and French by standard means and delete English.lproj from the app after building, for example as a build phase, as described here (2nd paragraph).