Localization doesn't work on iOS device.

Hello,

I’m tryng to get the iOS locale but it’s not working, works fine on simulator but on iPod Touch 5th nothing appears.
Here is my code:

display.newText( system.getPreference( "locale", "language" ), 0, 0, nil, 30 ) display.newText( system.getPreference( "ui", "language" ), 0, 50, nil, 30 )

Thanks.

What OS are you running on the device?

iOS 6.1.2.

I’ve pinged the engineers on it.  Have you tried changing your device to something other than the default? 

Is it possible the device doesn’t have those values set?

Yes, I tried Portuguese and English, nothing appears. I tried in XCode iOS Simulator, nothing appears too. On android device works fine.

Try putting somethign like this in your build.settings:

  settings = {    iphone =    {       plist =       {          CFBundleLocalizations =          {             "en",             "fr",             "de",             "ja",          }       }    } }

don’t worked. = /

I found a blog post and it would seem to indicate you need to spell the languages out:

http://www.monkeybin.no/blog/archives/2011/09/18/corona-sdk-localization-made-easy/

It might be worth using Google and searching for “Corona localization” and see what other hints you might get.

I had tried to follow this tutorial before posting my problem, but it not worked. The problem is in

 system.getPreference ("ui", "language")

Hello, the problem is solved.

The problem was in my project, I deleted everything and started again and it worked.

Rob, I followed the link you referred me: http://www.monkeybin.no/blog/archives/2011/09/18/corona-sdk-localization-made-easy/

Thanks and sorry.

What OS are you running on the device?

iOS 6.1.2.

I’ve pinged the engineers on it.  Have you tried changing your device to something other than the default? 

Is it possible the device doesn’t have those values set?

Yes, I tried Portuguese and English, nothing appears. I tried in XCode iOS Simulator, nothing appears too. On android device works fine.

Try putting somethign like this in your build.settings:

  settings = {    iphone =    {       plist =       {          CFBundleLocalizations =          {             "en",             "fr",             "de",             "ja",          }       }    } }

don’t worked. = /

I found a blog post and it would seem to indicate you need to spell the languages out:

http://www.monkeybin.no/blog/archives/2011/09/18/corona-sdk-localization-made-easy/

It might be worth using Google and searching for “Corona localization” and see what other hints you might get.

I had tried to follow this tutorial before posting my problem, but it not worked. The problem is in

 system.getPreference ("ui", "language")

Hello, the problem is solved.

The problem was in my project, I deleted everything and started again and it worked.

Rob, I followed the link you referred me: http://www.monkeybin.no/blog/archives/2011/09/18/corona-sdk-localization-made-easy/

Thanks and sorry.

Hi, 

Great tutorial, I also followed the link and everything works but one thing…

I don’t know if it’s a new change in the API or something but now the line:

language = system.getPreference( "locale", "language" )

returns ‘1033’ (insted of ‘en’).

Any suggestions? Is there any way to get ‘en’ instead of Country codes?  :huh:

Thanks,

Cristian.