Using localizable strings for specific dialects in iOS 4 [duplicate] - iphone

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
iPhone App Localization - English problems?
Currently, I have a localization strings file for Mexican Spanish. I do not have a plain Spanish strings file. I would like to have my app be localizable for this particular dialect of Spanish, and so in Xcode 4, I added Spanish-Mexican. I have a Localizable.strings (Spanish-Mexico) file generated by Xcode 4, with Spanish strings added. But when I go into the simulator and change the International settings to Español for Language and Mexico for region, the strings are not displayed, but the default English ones appear instead.
However, in the Simulator when I set the language to Spanish, and the Region Format to Mexico, the strings do not appear, but the plain English is displayed instead. Is there any way to support dialects in iOS 4, not just the languages that appear under Languages? There is the extensive Region Formats preference, but I'm uncertain how it's actually used.
I understand that Locale and Dialects are two different things. But other for different formatting to represent their files (underscore vs. hyphen), how do we use them in iOS? And is Locale and Region Format the same thing?
Relevant threads with the same problem:
iOS localization with region (de_LU)
iPhone en_* sublanguage localization
Hack-y workaround:
http://hamishrickerby.com/2010/07/23/iphone-ipad-localizations-regions/

Looks like it's currently unsupported:
When searching for resources in Mac OS X, the bundle interfaces take into account the user’s preferred region settings in addition to the preferred language settings. For languages that have multiple dialects, an application can specify custom resource files for each region. For example, for the English language, an application might include different sets of resource files for users in the United States, Great Britain, Canada, and Australia. By using the user’s preferred region settings, the bundle interfaces are able to return even more precisely localized content to the user. This support is available in Mac OS X only, though; in iOS, only the preferred language is taken into consideration.
http://developer.apple.com/library/ios/#documentation/MacOSX/Conceptual/BPInternational/Articles/InternatSupport.html

Related

Determine localized language of macOS device?

I want to get the language of the device (macOS). All I found is a bunch of examples for the app itself or the prefered user setting, not the device itself:
Locale.preferredLanguages => ["en", "de-DE"] (I'm using english XCode, non localized app and german macOS)
I want to set the labels of the Finder as extended attributes the same language as the OS itself. For me it is "de", regardless of the localization of the app.
I also found some old tips (5 - 10 years old) which needed a lot of changes in code, but still don't work.
What's the correct function call to get the language used by the OS to set color names like "Rot" or "Red" later on? (e.g. "de" for my setup)
I found an solution:
((Locale.current as NSLocale).object(forKey: NSLocale.Key.languageCode)! as! String)

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!

iOS: Setting primary language for app when localizing

I have built an app for swedish language only. Now I have added multilanguage support (english uk/us, german, spanish) and would like to submit the app to all App Stores in the world.
The problem is that I have chosen swedish as the primary language in Itunes Connect when creating my account.
Reading several threads about this I have come to the conclusion that if I submit the app now, the default language will be swedish for languages I haven't localized. This is a huge problem since there seems to be no way of changing this primary language.
Anyone know what can be done?
On the upside: When using a link in Itunes Connect "Version summary" I can see the language is in english when for example choosing "Slovenia" or any other country that hasn't been localized... Can I trust this really? Not according to several forum threads, example:
https://discussions.apple.com/thread/1678830?start=0&tstart=0
https://discussions.apple.com/thread/1657193?start=0&tstart=0
Thanks
I have now released the app and tried out several different App Stores and it seems like it does take english as the default langauge, not swedish which I have as primary.
This goes against what has been said before in forums and such. Also, Apple called me and we talked about this, but the support person wasn't sure why it worked either :)
For future people coming here, here is how it works for me now:
-I have localized in Itunes Connect for german, spanish and english.
In these App Stores the language will be displayed correctly for each country.
-I have NOT localized for Canada. If I add the app to this app store the language will be in swedish (your primary language).
-A language that is not possible to localize, like estonian, will in fact display my english app description in the Estonian app store. This could have something to do with the "Localization native development region" as Digital Robot stated as a comment.
have you tried this key on the Info.plist? To force iTC to see english as the default language.

iOS localization with region (de_LU) [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
iPhone App Localization - English problems?
I am working on an App for iOS devices. I made it available for English (en) and German (de). That works fine with localization. Now I want to create a specified localization for German with region Luxemburg: German (Luxemburg) or de_LU.
I added it into my Localizable.strings but nothing happened... I deleted the cache, I reinstall the app serval times: Nothing. He ignores that.
My iPhone is configured with the German language and Luxemburg as region.
Where is the problem? Or is it impossible to do that?
It is possible, to localize into that culture you should have a de-LU.lproj folder, is that the case?
A typical application has at least one strings file per localization, that is, one strings file in each of the bundle’s .lproj subdirectories. The name of the default strings file is Localizable.strings but you can create strings files with any file name you choose.
(Quoting Apple documentation)
If you're using Xcode 4, just go to project settings, Info tab, then add your localization from there, it will setup the project accordingly for you.
Also note that Apple recommends that you save strings files using the UTF-16 encoding
Check for region & language in code. If language German & region Luxemburg then keep new key for localization.And initialize that key in German language localized file. It is working for me.
Unfortunately, I believe that supporting dialects is currently impossible in iOS 4.

iPhone application Info.plist language property

Which property should I change on Info.plist in order to configure the list of languages shown in itunes store under my submitted application?
EDIT: My application will be in Greek and I want to see Greek as the only language under Languages in the App Store. How do I do that?
It seems that the "Localization native development region" value on the .plist file is related to the languages that appear on the app store after Languages.
What you list in the plist does not affect what is shown in iTunes. When you submit to itunesconnect, you will be asked to enter languages that are supported. Of course , you will want to match these languages up with what your app really can support, but iTunes will not just show the supported languages by default.
EDIT:
It appears the OP is just asking how to localize within the app. See here