Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Does Corona support App Name localization?
Started by greg886 Sep 02 2013 10:06 PM

- - - - -
42 replies to this topic
[TOPIC CONTROLS]
Page 1 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Pro
  • PipPipPipPipPipPip
  • 860 posts
  • Jedi

Does Corona support App Name localization and can I get some advice on what best to do here. Note Im on Pro only, not enterprise. Also I mean by support the ability to build once for IOS say and only have to upload one binary that supports the different names.

So I'm talking about actual app name and how to localise this. Well how best to maximise downloads and i guess im assuming app name/title localization should be dine. Like I'm assuming:
- content: do that in lua inside your app
- descriptions: put in iTunes Connect or Google Play web page
- app title, that appears under the icon <== THIS ONE

Also I'm not sure Corona Pro actually let's you have one code base and one binary output that gives you a custom name for each language? You might need Enterprise for this I thought I read....

[TOPIC: post.html]
#2

batgirl717111

[GLOBAL: userInfoPane.html]
batgirl717111
  • Pro
  • PipPipPipPipPipPip
  • 56 posts
  • Jedi

hey greg,
OP from the post you linked :) got a note about your reply here.
yes you can change the name under the icon, it takes some fussing but is do-able. you can do it with pro, you don't need enterprise (unsure about starter, haven't tested but i don't see why it wouldn't work).  you only need one binary file.
 
check out my tutorial post on localizing apps for corona on my blog, it should cover all of your questions:
 
good luck!! :)


[TOPIC: post.html]
#3

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Pro
  • PipPipPipPipPipPip
  • 860 posts
  • Jedi

thanks - that's a great post - will have to review carefully (was going to review immediately and give some feedback but there is a bit of content there lol) - your graphics look great by the way 

 

overall all though batgirl your general advice with Corona then would be go ahead and localise everything?  i.e. content in your app, the app title in the store, the app icon title (which I was asking about) and the descriptions in the app store?  i.e. all are quite important do you think?



[TOPIC: post.html]
#4

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Pro
  • PipPipPipPipPipPip
  • 2,637 posts
  • Jedi

Wow!!! A very comprehensive tutorial / review. Thank you so very much.

[TOPIC: post.html]
#5

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Enterprise
  • PipPipPipPipPipPip
  • 2,072 posts
  • Jedi

@batgirl717111

 

Great post!



[TOPIC: post.html]
#6

batgirl717111

[GLOBAL: userInfoPane.html]
batgirl717111
  • Pro
  • PipPipPipPipPipPip
  • 56 posts
  • Jedi

hey greg,
sure thing, i hope it is helpful!  lol yeah it did get a little long… oops ;P
thank you for your compliments too! :D
 
the extent you should localize is up to you.  if your game is pretty self-explanatory, like an angry birds game where the user could figure out what to do without instructions, you might not need to.  think about if you downloaded an app and it were in chinese (assuming you don't speak chinese)- how far into your app would you be able to get?
if it's fairly simple you could probably get away with just localizing the description. as i mention in the epic localization post, a lot of translators i hired said that english app titles in foreign markets are common, so you could do the title or not.
 
personally i want to leave a good impression, even at my own expense ;) so i go through and translate all the in-game text, titles, descriptions, everything.
 
the other thing to keep in mind is your time and how much can you dedicate to this.  localizing into a second language takes a little while, but once you get your app set up to detect languages and swap out text and graphics as appropriate, it's pretty easy to add in more languages.
 
however once you get to a certain point it can get really time consuming, especially once you get to submitting the apps and entering the metadata (and if you localize screenshots it gets worse).
if you have one app in english on ios & android, you'll need:
-1 title
-1 description, keywords
-5-15 ios screenshots (iphone 4, iphone 5, ipad)
-5 android screenshots (optional, for 7" tablets)
-2 promo graphics (google)
 
and you'll have to put everything in twice (once for apple, once for google).
 
if you have one app in 8 languages on ios & android (typical set, covers english-french-italian-german-spanish-chinese-japanese-korean) then you'll need:
-8 titles
-8 descriptions, keywords
-30-120 screenshots (iphone 4, iphone 5, ipad)
-30 android screenshots (optional, for 7" tablets)
-16 promo graphics (google)
 
and you'll have to put everything in sixteen times (eight times for apple, eight times for google).
 
like i said it is worth it to localize all the way imho, but it does take some time (think about when you get multiple apps and more than one market).  my most recent localized app was Ballet Fashion Show in 21 languages on six markets- it does very well but the localizations took FOR-EVER.
 
anyway let me know if you have more questions :) good luck with the localization!
 
ksan and ingemar: you're welcome! :) hope it is helpful


[TOPIC: post.html]
#7

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Pro
  • PipPipPipPipPipPip
  • 2,272 posts
  • Jedi

@batgirl717111, thank you so much for sharing all your knowledge.  It is super helpful.

 

About the app title for Android version, is it enough to simply create lproj folder for each language and add InfoPlist.strings file for each language without anything special included in build.settings for Android?

 

Naomi



[TOPIC: post.html]
#8

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Pro
  • PipPipPipPipPipPip
  • 860 posts
  • Jedi

thanks batgirl - the "30-120 screenshots" really brings it home :)   hadn't even thought of screenshots...



[TOPIC: post.html]
#9

batgirl717111

[GLOBAL: userInfoPane.html]
batgirl717111
  • Pro
  • PipPipPipPipPipPip
  • 56 posts
  • Jedi

Naomi, no problem!  As I think I said in the blog post, it helps me too- haha- I would never remember all these little steps on my own ;)

I'm not sure about Android- although if you try it out please let me know what the result is.  My app was only rejected from Apple for the title not matching, so I only fixed the Apple build, haven't tried it on Android.

 

greg886, ikr? haha.  you can write a script to iterate through the app and take screenshots where you want and reload in each language and run the script, depending on how your app is designed and how much time you want to sink into it.  alternatively you can take screenshots with no text and leave them with no text, or take them, photoshop out the text, and then photoshop it back in for each language.  haha i have to be careful or i'm going to talk myself out of localizing my next apps here!



[TOPIC: post.html]
#10

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Pro
  • PipPipPipPipPipPip
  • 2,272 posts
  • Jedi

@batgirl717111, thank you so much for your reply.  I saw someone else on Forum who seems to be in desperate need for help with localizing Android app title to Japanese, so I thought I'd direct this user to your blog post, -- but then I thought before doing so, I should make sure...

 

Naomi



[TOPIC: post.html]
#11

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Enterprise
  • PipPipPipPipPipPip
  • 2,072 posts
  • Jedi

@naomi

The approach above is for iOS only and will not work for Android. (lproj folders and plist files are Apple specific)

 

It's possible to do this for Android though, but it requires a different approach which is more hands-on and requires a bit more fiddling around with the APK.

 

I haven't done this myself (yet), so I can't verify that all steps are included below, but from what I can see you should be able to do the same thing for Android with these steps:

(Note: You *don't* need to be Enterprise to do this)

 

1) Compile the app with Corona

 

2) Unpack the APK from the command line (I use apktool on Mac OSX)

 

3) Create the necessary resources in the /res folder

Example: 

Japanese: /res/values-ja/strings.xml

French: /res/values-fr/strings.xml

 

4) Re-pack and sign the APK

 

For more info on localizing for Android:

http://developer.android.com/guide/topics/resources/localization.html



[TOPIC: post.html]
#12

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Pro
  • PipPipPipPipPipPip
  • 2,272 posts
  • Jedi

@ingemar, thank you so much!  I'll definitely keep it in mind.  I'll also pass it along.

 

Naomi



[TOPIC: post.html]
#13

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Enterprise
  • PipPipPipPipPipPip
  • 2,072 posts
  • Jedi

EDIT: The approach below might not work if you are using Corona plugins as they might not survive the unpacking/packing process performed by apktool.

 

I was bored and decided to take a break and have some fun with this Android stuff (...I know... I'm a nerd...)

I managed to get the app title localized more easily than I had thought on Android (it took me longer to write this post than it did to localize the app title :P ). Tested on Android 2.3.6 and Android 4.3.

 

Prerequisites:

1) Android SDK installed and configured (to be able to sign and verify the APK)

2) apktool (To unpack/pack the APKs https://code.google.com/p/android-apktool available for Mac/Win/Linux)

 

Step 1: Compile your app with Corona.

 

Step 2: Unpack the APK created by Corona. From the command line run:

apktool d your-app-name.apk

 

Replace 'your-app-name' above with the name of your APK. This will create a folder named 'your-app-name' in the current folder.

 

Step 3: Go to the /res/values folder within the folder created in step 2 (this is the folder for the default language)

 

Step 4: Edit strings.xml. It will contain a lot of facebook stuff, but you just need to add a line below the <resources> tag:

 

<string name="apptitle">My App Title</string>
 
Since this is the default language, I enter the name I want to see under my app icon in English.
 
Step 5: Create new folders in the /res folder for every language you want to support. 
For Japanese it would be values-ja and for French the folder name would be values-fr.
 
In each of these folders above create a file named strings.xml with the following content:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="apptitle">My Localized App Title</string>
</resources>

 

Replace 'My localized App Title' with the app name written in the desired language.

 

Step 6: Modify the manifest.

The manifest created by Corona needs to be modified. Open AndroidManifest.xml and search for 'android:label'.

There are two places that need to updated. Both should be modified to read: android:label="@string/apptitle".

 

You might need to modify the FileContentProvider's authorities string as well.

Search for FileContentProvider and check the authorities string on the same line. It should read "com.ansca.corona.files". If it's anything else, change it.

 

Step 7: Create a new APK.

Make sure you're in the top-level folder (the same folder as when you ran step 2)

From the command line run:

apktool b your-app-name new.apk

 

IMPORTANT: Do not type '.apk' after your-app-name as you want apktool to read from your modified folder.

 

Step 8: Sign and verify your new APK 

I have a small script that does this for me (see below. I'm on Mac OSX)

WARNING: This is a bare-bones script with minimal validation. You'll need to replace three things for it to work

1) /path/to/your/keystore is the path to your own Android keystore file.

2) your-password is the password for your keystore.

3) your-alias is the alias for your keystore.


I call my script 'signapp' so I run the following from the command line:

signapp new.apk

#!/bin/bash

if [ -z "$1" ]; then
        echo "Please specify a file to sign"
        exit 1;
fi

jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore /path/to/your/keystore -storepass your-password $1 your-alias 

zipalign -v 4 $1 zip-$1 
rm $1 
mv zip-$1 $1

 

 

Step 9: Delete your old APK and rename 'new.apk' to your original app name APK.

 

 

Done!   Install and test on your device

 

Hope this helps...

 



[TOPIC: post.html]
#14

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Pro
  • PipPipPipPipPipPip
  • 2,272 posts
  • Jedi

Wow.  Thank you so much, @ingemar.  It's super helpful.

 

Naomi



[TOPIC: post.html]
#15

batgirl717111

[GLOBAL: userInfoPane.html]
batgirl717111
  • Pro
  • PipPipPipPipPipPip
  • 56 posts
  • Jedi

wow, thanks for the tutorial ingemar!!! i will try this out on my next app and link up this thread to my blog post if that's okay with you :)

 

cheers and thanks again!!

batgirl717111



[TOPIC: post.html]
#16

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Enterprise
  • PipPipPipPipPipPip
  • 2,072 posts
  • Jedi

Thanks! I'm glad it was useful.

 

It's perfectly OK to link this thread if you wish :-)



[TOPIC: post.html]
#17

batgirl717111

[GLOBAL: userInfoPane.html]
batgirl717111
  • Pro
  • PipPipPipPipPipPip
  • 56 posts
  • Jedi

cool, just linked it up :)  thanks again!!



[TOPIC: post.html]
#18

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Pro
  • PipPipPipPipPipPip
  • 860 posts
  • Jedi

hi batgirl/guys - just getting to the point of implementing this and having troubles (on IOS) - wonder if you could confirm it I've got it right.

 

So to get localized app titles (under the icon) you need to the following?   I'm doing this but I'm still not seeing the app title change under the icon when I change the "LANGUAGE" setting of my iPhone.  

 

a) put CFBundleLocalizations in build.settings per below

settings = {
    iphone =
    {
        plist =
        {
             CFBundleIconFile = "Icon.png",
             CFBundleIconFiles = { << cut for this put >>},
             CFBundleLocalizations = {
                "English",
                "French",
                "Japanese",
                "Chinese",
            },
        },
    },

b) put a 'InfoPlist.strings' file for each language in a directory like 'fr.lproj' under the root.  In the strings file put: 

CFBundleDisplayName = “Parachutiste”;

 

Is this all that's required?  I must be either (a) missing something here or (b) misunderstanding how to test a change of language on my iPhone to test this?

 

 

 

 

 

 



[TOPIC: post.html]
#19

batgirl717111

[GLOBAL: userInfoPane.html]
batgirl717111
  • Pro
  • PipPipPipPipPipPip
  • 56 posts
  • Jedi

greg886, that should do it. just to confirm how you're changing languages, you're going into settings > general > international > language and selecting the language, then done, right?  Then it'll go blank for a few seconds, then reboot in the chosen language.  Usually the native app titles will be localized (settings, pictures, etc), so you can check those to make sure you're in a different language.



[TOPIC: post.html]
#20

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Pro
  • PipPipPipPipPipPip
  • 860 posts
  • Jedi

thanks - think I have it - I made two changes so one of these worked:

a) put a CFBundleName = "xxxx";  line in as well as the CFBundleDisplayName

b) noted that the inverted commas I'd used (from a copy paste) were ones with a slight angle in them, so replaced with the normal ones - doh.  I never even saw the difference but I'd just copied pasted the lines from another file to make sure I had the spelling right, then it worked, and on closer inspection noticed it

 

Oh - I'm still not sure which language line in the iPhone languages list to trigger the "zh" (chinese) - don't suppose you know which one?



[TOPIC: post.html]
#21

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Enterprise
  • PipPipPipPipPipPip
  • 2,072 posts
  • Jedi

Hi there,

 

Traditional Chinese (official language of Taiwan)

Simplified Chinese (official language in mainland China)

 

Scroll down in the language list and find these "squiggles"  ;)

 

 

 

PS.

Option b above in your post was the culprit.



[TOPIC: post.html]
#22

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Pro
  • PipPipPipPipPipPip
  • 860 posts
  • Jedi

thanks ingemar for confirming.  Oh I'm pretty sure I've tried these but didn't see the localization being picked up.  I'll try again, but while you there, I have 3 languages working fine, but for Chinese I'm using the following...i.e. just in case you see something obvious:

 

In build.settings:

 

             CFBundleLocalizations = {
                "English",
                "French",
                "Japanese",
                "Chinese",
            },
 
In zh.lproj/InfoPlist.strings
  CFBundleDisplayName = "伞兵";
  CFBundleName = "伞兵";
 
In my code:  looking for "zh" to match self:getDeviceLanguage()
 
 
 
 


[TOPIC: post.html]
#23

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Enterprise
  • PipPipPipPipPipPip
  • 2,072 posts
  • Jedi

You don't need CFBundleName in InfoPlist. You can take it away (That's the filename you internally give the app).

 

It's recommended to use 2-letter country codes instead of country names in CFBundleLocalizations.

My suggestion would be:

 

CFBundleLocalizations = {
    "en",
    "fr",
    "ja",
    "zh,
}

 

 

A full list of country codes can be found here:

http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes



[TOPIC: post.html]
#24

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Pro
  • PipPipPipPipPipPip
  • 860 posts
  • Jedi

ok thanks - that makes much more sense - I'll try this...



[TOPIC: post.html]
#25

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Pro
  • PipPipPipPipPipPip
  • 860 posts
  • Jedi

I've tried this but still see the Japanese title under the icon which is very strange - I've attached the very simple code I've used....I don't suppose you can see where I'm going wrong?

 

 

Attached Files




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]