2

I have an IOS app which have a Mexican Localized strings file and I would know what's doing that the app is MX localized. There is no "Español (México)" in the Ipad language list...

Edit2: I have set the language to "Español" and set the timezone to Mexico, but all the app stay configured as spanish app. Can't we make a mexican localized app (or other localization profile that is using sub-identifier)?!

Saint clous very muche !

Hacketo
  • 4,978
  • 4
  • 19
  • 34

2 Answers2

1

You can choose Spanish - Mexico localization inside Other item of list.

Numeral
  • 1,405
  • 12
  • 24
0

You have 2 options here:

Add in your project settings the language and "localize" the files.

enter image description here

Localize the single files (for example the Localizable.strings)

enter image description here - enter image description here

Or access it inside code with

NSString *localID = ((NSLocale *)[NSLocale currentLocale]).localeIdentifier;

for example and build up a different structure (like I had to do in "Allow only specific translations for different schemes/targets" for example)

Community
  • 1
  • 1
geo
  • 1,781
  • 1
  • 18
  • 30
  • My app is already Localized, I have es-MX Localizable. My probleme is that I can't test the Méxican version with Spanish language settings on Ipad because I have also a Spanish localizable file in my project. – Hacketo Jul 01 '13 at 11:43
  • Okay, I understand your problem. the `NSLocalizedString` seems not to take the **es_mx** identifier, even though it is set. In this case I really recommand to take a look at my link and **restruct the localization call** if you find no other way. But use this line given here instead of the one in the other answer, or will never get the _mx in the identifier :) – geo Jul 01 '13 at 12:11
  • I think i expressed myself badly ^^. In fact i don't know how the locale MX is set, because there is no "Español (México)" in the Ipad language list... I tryed to set the language as Español and set the timezone to Mexico but it did nothing. How the sub-identifier is set in the locale of the device ? At final, I want to launch my app with a device that's have locale settings set to es-MX – Hacketo Jul 01 '13 at 12:54
  • this should be the right way, but it seems that it is not working. Therefor I have this "workaround" because you can get out of your region (`((NSLocale *)[NSLocale currentLocale]).localeIdentifier`) your desired identifier (**es_mx**). But you cannot use this with `NSLocalizedString` (as it seems), so you have to restruct and call the localized strings from bundle. Already took a look at the link? If you have questions we can go into chat instead of flooding the comments ;) – geo Jul 01 '13 at 13:03
  • you need at least 20 reputation to gain write access :/ http://chat.stackoverflow.com/rooms/32687/geos-direct-help – geo Jul 01 '13 at 14:45