Localizing for Chinese

Hi,

I am wanting to localize my app for Chinese content (wife is Chinese so I may as well).

I have the technical side of things working, however I have a couple of questions regarding the specifics.

1.  What do I put in for CFBundleLocalizations?  I am guessing I use “zh-Hans” for simplified Chinese? The corona documentation links to this and it only lists ‘zh’.  However I did some digging and found this which links to language IDs under CFBundleDevelopmentRegion, would this be the same?  Here is lists “zh-Hans”.

  1. I have been trying to figure out how to see what language the users device is in,  I came across a few different posts that show code similar to this

[lua]

if(isAndroid) then

 language = system.getPreference( “locale”, “language” )

else

 language = system.getPreference( “ui”, “language” )

end

[/lua]

However, as you can see below, these return completely different results and ““locale”, “language”” does specify whether it is simplified or traditional Chinese?  Would I be better of using “ui” for both Android and iOS? Or is there some other option?  Cheers

– ipad (system.getPreference( “locale”, “language”):lower() =      zh

– ipad system.getPreference( “ui”, “language” ):lower() =            zh-hans-au

– Android system.getPreference( “locale”, “language”):lower() = zh

– Android system.getPreference( “ui”, “language” ):lower()) =     中文

Thanks,

Craig

So you’re trying to offer the app in Chinese? I will need to do this as well so am interested to hear how this is done too. I’ve only just started with Corona today thought so won’t be able to help unfortunately.

Hi

In build.settings I used

            CFBundleLocalizations =

            {

                “en”,           --English

                “it”,             --Italian

                “ro”,            --Romanian

                “zh-Hans”,  --Simplified chinese

                “zh-Hant”,   --Traditional chinese

            },

Stefan

Awesome,

Thanks Stefan,  can I ask how you which method you are using to detect device language?

Cheers,

Craig

Hi,

I used  

system.getPreference(‘locale’, ‘language’).

Stefan 

Hi!

I also need to localize the app bundle name into chinese. But when I add zh-Hant and zh-Hans with the Chinse App name, the App name stays as the default app name…

Anyone had the same experience?

Cheers,

Patrick

What about the fonts, will it be able to select the system Chinese fonts or do we have to package a font with the app? I ask because Chinese fonts can be huge…anything from 8MB to 50MB per font.

I used “Fang zheng Zhong deng xian Font” for traditional and simplified chinese.

Ok, how big is that font? Is there no way to use the fonts onboard the device? All devices seem to come with Asian fonts these days so it seems a waste to add so much to the app size with just one font…worse if you need more than one which to be honest you probably do.

The font it’s about 3Mb. With Corona you can use _ native.systemFont _ or your ttf fount, anyway probably you don’t have the same asian fonts on iOS and Android Device.

Stefan

So you 

So you can use for _ native.systemFont _ for Chinese fonts too? 

I used “Fang zheng Zhong deng xian Font” becouse I’m not sure that native.systemFont has all ideograms.

Ok I see. Thanks for your help.

So you’re trying to offer the app in Chinese? I will need to do this as well so am interested to hear how this is done too. I’ve only just started with Corona today thought so won’t be able to help unfortunately.

Hi

In build.settings I used

            CFBundleLocalizations =

            {

                “en”,           --English

                “it”,             --Italian

                “ro”,            --Romanian

                “zh-Hans”,  --Simplified chinese

                “zh-Hant”,   --Traditional chinese

            },

Stefan

Awesome,

Thanks Stefan,  can I ask how you which method you are using to detect device language?

Cheers,

Craig

Hi,

I used  

system.getPreference(‘locale’, ‘language’).

Stefan 

Hi!

I also need to localize the app bundle name into chinese. But when I add zh-Hant and zh-Hans with the Chinse App name, the App name stays as the default app name…

Anyone had the same experience?

Cheers,

Patrick

What about the fonts, will it be able to select the system Chinese fonts or do we have to package a font with the app? I ask because Chinese fonts can be huge…anything from 8MB to 50MB per font.

I used “Fang zheng Zhong deng xian Font” for traditional and simplified chinese.