[Solved] Problem with CFBundleLocalizations and CFBundleDisplayName

Hi there!
We are working in a localized app with suport to Portuguese, English and Spanish. Everything was ok until setting up CFBundleLocalizations in build.settings. Before that, the CFBundleDisplayName worked fine for all the three languages, now (after setting CFBundleLocalizations) just English and Portuguese works and when my devide is in spanish it shows my app name in english.

my build.settings

settings = {  
 orientation = {  
 default = "landscapeLeft",  
 content = "landscapeLeft",  
 supported = {  
 "landscapeLeft",  
 "landscapeRight",  
 }  
 },  
 iphone = {  
 plist = {  
 CFBundleLocalizations = {  
 "Portuguese",  
 "Spanish",  
 "English",  
 },  
 CFBundleVersion = "1.0.0",  
 }  
 }  
}  

my en.lproj/InfoPlist.strings

CFBundleDisplayName = "AppNameInEnglish";  

my es.lproj/InfoPlist.strings

CFBundleDisplayName = "AppNameInSpanish";  

my pt.lproj/InfoPlist.strings

CFBundleDisplayName = "AppNameInPortuguese";  

It looks like that “es” is not for spanish, not in this case. The localization inside our app still works perfectly.

Did anyone seen this before? Any tips? [import]uid: 50425 topic_id: 15761 reply_id: 315761[/import]

Try this:

[lua]CFBundleLocalizations = {
“pt”,
“es”,
“en”,
}[/lua] [import]uid: 10478 topic_id: 15761 reply_id: 58204[/import]

It worked perfectly!! Thank you! :slight_smile: [import]uid: 50425 topic_id: 15761 reply_id: 58855[/import]

You’re welcome! :slight_smile: [import]uid: 10478 topic_id: 15761 reply_id: 58904[/import]

Thanks for the info! But how do you set the default localization name? For instance, if the user’s iPhone default locale is Corean, and your build.settings does not have a name in Corean set up, how do you tell the OS to display the name in English? Thanks!

-Dario
[import]uid: 21281 topic_id: 15761 reply_id: 69159[/import]

Hi Dario. Im my case, it is shown in englsh without change anything. [import]uid: 50425 topic_id: 15761 reply_id: 69227[/import]

Wondering the same thing as Dario. Maykelsb, how did you set the default localization?

I’ve tried by having the default splashscreen I want in my project-folder and my localized splashscreens in my en/sv.lproj folders, but this doesn’t work the app will always pick the default splashscreen and ignore the localized ones…
Also I’m having issues with localizing the splashscreen for retina devices… The iPhone 4 picks the en.lproj-folder even though it’s a swedish phone. System.getPreference(“ui”) returns the correct language (sv) but the phone still shows the splashscreen in the en.lproj folder… Anyone else stumbled upon this issue?

App name and everything works perfectly it’s just the splashscreen [import]uid: 14018 topic_id: 15761 reply_id: 77437[/import]

@Mitaten: Yeah, this is what happened in my project. [import]uid: 50425 topic_id: 15761 reply_id: 77732[/import]

Okay, seems like the app picks the en.lproj folder as default so there’s no need to specify a “default” language folder

Edit: Also for my other issue, I solved that by doing a “clean-up”. I deleted my .lproj folders and made new ones and inserted new images inside of them. Deleted the app from my device and reinstalled it with everything being new, that solved it. Seems like there was a cache issue of some sort [import]uid: 14018 topic_id: 15761 reply_id: 77625[/import]

Hi! Im “new user” and I have a question about multilanguage support.
I use Corona SDK on localized WinXP(Russian) and use notepad++ to edit files.
Today I was learning Corona and practiced to display text on the Corona device simulator. Something like that:

local text = display.newText("Hello!!!",250, 250, "Arial", 36) Everything was ok.Then I tried to change english charachters to russian.

local text = display.newText("??????!!!",250, 250, "Arial", 36) I’ve seen nothing at the simulator screen except three exclamation mark “!!!”
Then I opened Notepad++ menu->Encoding (There was chosen “Encode in ANSI”). I changed this to “Encode to UTF-8 without BOM”.
Then I print my russian text “!!!” again. And simulator displaeyd it correctly witn cute russian symbols.
Attention - a question!:slight_smile:
Simulator displays russian symbols correctly only because I use localized WinOS with enabled Cyrillic symbols support?
Or my app could display any languages on any devices all over the world if I will edit code in notepad++ with “UTF-8 without BOM” option enabled?
Can I make the app with a MENU where user can chose a language?
And all text (in all languages) was in one file, and the program simple chose a strings on a language that user needs?
*What Encoding type is enabled in your Notepad, when you’re coding multilanguage app?

P.S. I’m ashamed for my English (it’s a reason why my post is so long. I hope that anybody understood me, and what I want to know=)

[import]uid: 120280 topic_id: 15761 reply_id: 83442[/import]

@samo

If you use UTF-8 it will display correctly on any device.

There are different ways to localize an app. I’m making a book in different languages. I made a file with text like this

local text = {}  
  
text["sv"] = {}  
text["sv"][1] = "Lejf är ett gosigt lejon."  
  
text["ru"] = {}  
text["ru"][1] = "???? – ????? ????????? ???????."  

and the I have a function returning text based on language and text

local function pageText(pageNumber, languageCode)  
 return text[languageCode][pageNumber];  
end  

I hope that helps a little. [import]uid: 40334 topic_id: 15761 reply_id: 87536[/import]

That is I want to know. Thank you for your help! [import]uid: 120280 topic_id: 15761 reply_id: 87657[/import]