Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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

- - - - -
57 replies to this topic
[TOPIC CONTROLS]
Page 2 of 3 1 2 3
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

oh - I just noted that:  system.getPreference on my Mac is giving back "zh-Hant" not "zh".   So I wonder if this is an issue if:

 

a) CFBundleLocalizations in build.settings has "zh", and

b) directory name for InfoPlist.string is "zh.lproj"

 

Any ideas? 

 

Ref from api: 

 

  system.getPreference()

   print( system.getPreference( "ui", "language" ) ) -- print the ui (device) language (eg. en)

 



[TOPIC: post.html]
#27

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

well did get things working by adding additional:

 

a) line items in CFBundleLocalizations for     "zh-Hans" and "zh-Hant", and

b) two additional directories for the InfoPlist.strings to cover "zh-Hans" and "zh-Hant" as well as "zh"

 

 



[TOPIC: post.html]
#28

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

That's good to know.
I assumed that zh would have been chosen by default for both zh-Hans and zh-Hant if there were no specific localizations for the Simplified and Traditional variants.

 

Be aware that they are two different scripts though. Traditional Chinese (zh-Hant) is the official script for Taiwan, whereas Simplified Chinese (zh-Hans) is the official script for mainland China.
If you specify both zh-Hans, and zh-Hant in CFBundleLocalizations, then you're telling your users that the app supports both scripts. I'm not sure, but this may cause some backlash (review-wise) unless it's actually been translated to both variants.



[TOPIC: post.html]
#29

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

the plot thickens :)    thanks for the education ingemar -  I think I'd better stick with zh-Hans for the moment and see how that goes 



[TOPIC: post.html]
#30

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

One thing you can do is to only specify zh-Hans in your CFBundleLocalizations, but keep all the .lproj directories. That way the app is advertised to support Simplified, and should pick up the Simplified Chinese script even if the device is set to Traditional.



[TOPIC: post.html]
#31

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

actually just coming back to the Android steps required to get the app name displayed localized on Android & found ingemar steps - thanks

 

Anyone know if Coronalabs is planning to support this process so you only need to build once with corona and then get the final apk that will work?  



[TOPIC: post.html]
#32

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

[TOPIC: post.html]
#33

batgirl717111

[GLOBAL: userInfoPane.html]
batgirl717111
  • Enthusiast

  • 80 posts
  • Corona SDK

thanks for posting the feature request!  I just added 3 votes to it, fingers crossed Corona is able to do this feature :)



[TOPIC: post.html]
#34

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

Unfortunately (re trying to get the app title localized for Android) when I try to unpack & repack the Android APK file I am getting the following issue when starting the app on Android:
V/Corona  (29778): The AndroidManifest.xml provider "com.ansca.corona.storage.FileContentProvider" is misconfigured. Please change its 'authorities' attribute value to "com.ansca.corona.files"
 

That is after:

 - apktool d myapp.apk 
 - apktool b myapp myapp_new.apk
 - signing new with "jarsigner" tool and then "zipalign"
 
Notes:
*  I've tried making the suggested change but then when running this version I get "Unfortunately, MyApp has stopped", with no debug info appearing in the terminal window using "adb logcat Corona:v *:s"
* I did update my Android tools on Mac via "./android sdk"
* MyApp was compiled using Corona: Version 2013.1251 (2013.11.1) [not ready for v2.0 yet]
* I tried this by the way without even trying to make the strings.xml file changes - just trying to prove things work first
 
 
Any ideas?


[TOPIC: post.html]
#35

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

I downloaded build 1251, checked out a G1 build of one of my apps and compiled for Google Play.

I can confirm that I got this error too all of a sudden. Looks like something has changed in their build process. 

 

No problem though. I did what the message suggested (modified the manifest and changed the 'authorities' attribute of the FileContentProvider to 'com.ansca.corona.files') and then did a new 'apktool b' and everything was OK.

 

I've modified the instructions in my post above to check the FileContentProvider string.



[TOPIC: post.html]
#36

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

Oh. I did the same thing and had the issue. I'll try again later noting you got it working. Thanks

[TOPIC: post.html]
#37

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

Whilst I got this approach working for a test app (hello world), I still can't get it to work my actual app.  It actually now installs, but when you run it it fails...I note in the log file items like the below:

 

Wondering if there is an issue with the technique for apps that are using Corona Plugins?  

 

E/AndroidRuntime(26903): FATAL EXCEPTION: main
E/AndroidRuntime(26903): Process: au.com.mixedup.Parachutist, PID: 26903
E/AndroidRuntime(26903): java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.
E/AndroidRuntime(26903):     at com.google.android.gms.internal.u$f.a(Unknown Source)
E/AndroidRuntime(26903):     at com.google.android.gms.internal.u$f.a(Unknown Source)
E/AndroidRuntime(26903):     at com.google.android.gms.internal.u$b.A(Unknown Source)
E/AndroidRuntime(26903):     at com.google.android.gms.internal.u$a.handleMessage(Unknown Source)
E/AndroidRuntime(26903):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(26903):     at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(26903):     at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime(26903):     at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(26903):     at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(26903):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime(26903):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime(26903):     at dalvik.system.NativeStart.main(Native Method)


and warnings appear:


V/Corona  (26903): > Class.forName: CoronaProvider._native.popup.social.LuaLoader
V/Corona  (26903): WARNING: Could not load 'LuaLoader'
W/System.err(26903): java.lang.ClassNotFoundException: CoronaProvider._native.popup.social.LuaLoader
W/System.err(26903):     at java.lang.Class.classForName(Native Method)
W/System.err(26903):     at java.lang.Class.forName(Class.java:251)
W/System.err(26903):     at java.lang.Class.forName(Class.java:216)
W/System.err(26903):     at com.ansca.corona.NativeToJavaBridge.callLoadClass(NativeToJavaBridge.java:375)
W/System.err(26903):     at com.ansca.corona.JavaToNativeShim.nativeRender(Native Method)
W/System.err(26903):     at com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:163)
W/System.err(26903):     at com.ansca.corona.Controller.updateRuntimeState(Controller.java:234)
W/System.err(26903):     at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:399)
W/System.err(26903):     at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1622)
W/System.err(26903):     at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)
W/System.err(26903): Caused by: java.lang.NoClassDefFoundError: CoronaProvider/_native/popup/social/LuaLoader
W/System.err(26903):     ... 10 more
 

 

 
 


[TOPIC: post.html]
#38

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

That's a huge bummer. I think you might be right.

I don't have anything to test at the moment, but something has definitely changed in the build process since this approach worked flawlessly before.

 

It might be that the good ol' apktool days are numbered when using plugins... I hope not though.



[TOPIC: post.html]
#39

Aatos Media

[GLOBAL: userInfoPane.html]
Aatos Media
  • Contributor

  • 128 posts
  • Corona SDK

Hopefully this helps someone else.

 

I didn't get the right language codes with: system.getPreference("ui", "language")

 

After about an hour, I tested the code in Mac and everything was fine. It seems that Windows 7 won't return the correct language codes.



[TOPIC: post.html]
#40

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 911 posts
  • Corona SDK

I had some troubles on Android and found that the following worked...probably needs more comprehensive testing no doubt...it was a few months back I run in the the problem and this seems to fix things:

 

 

        if device.isApple then
            langStrOrig = system.getPreference( "ui", "language" )
        else
            langStrOrig = system.getPreference( "locale", "language" )
        end
 

 



[TOPIC: post.html]
#41

f.losco

[GLOBAL: userInfoPane.html]
f.losco
  • Observer

  • 13 posts
  • Corona SDK

I also tried to way to locate the title, but following
the procedure


  - Apktool d myapp.apk
  - Apktool b myapp myapp_new.apk
  - Signing new with "jarsigner" tool and then "Zipalign"

  I have the same error: "Unfortunately, MyApp has stopped"

 

same problem of greg886

 

Any ideas?



[TOPIC: post.html]
#42

appn2o

[GLOBAL: userInfoPane.html]
appn2o
  • Observer

  • 5 posts
  • Corona SDK

Can you mention your problem very clearly do I can understand properly and try to solve it. I and my one friend have good Android knowledge but I couldn't understand the problem.



[TOPIC: post.html]
#43

toga

[GLOBAL: userInfoPane.html]
toga
  • Contributor

  • 103 posts
  • Corona SDK

 

Unfortunately (re trying to get the app title localized for Android) when I try to unpack & repack the Android APK file I am getting the following issue when starting the app on Android:
V/Corona  (29778): The AndroidManifest.xml provider "com.ansca.corona.storage.FileContentProvider" is misconfigured. Please change its 'authorities' attribute value to "com.ansca.corona.files"
 

That is after:

 - apktool d myapp.apk 
 - apktool b myapp myapp_new.apk
 - signing new with "jarsigner" tool and then "zipalign"
 
Notes:
*  I've tried making the suggested change but then when running this version I get "Unfortunately, MyApp has stopped", with no debug info appearing in the terminal window using "adb logcat Corona:v *:s"
* I did update my Android tools on Mac via "./android sdk"
* MyApp was compiled using Corona: Version 2013.1251 (2013.11.1) [not ready for v2.0 yet]
* I tried this by the way without even trying to make the strings.xml file changes - just trying to prove things work first
 
 
Any ideas?

 

I have the same problem. the app crashes after changing the FileContentProvider to 'com.ansca.corona.files'. if i do not change the  FileContentProvider my app works but i get a message that i must change  the FileContentProvider to 'com.ansca.corona.files'. Very strange. I am not aware of using any plugins.

Any ideas? It is very frustrating because i just wanted to deploy my app.



[TOPIC: post.html]
#44

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

I just found you can create different app titles for different languages in Google Play.

 

You don't need to implement this inside the app.

 

Just do it in the Google Play console.



[TOPIC: post.html]
#45

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

That's only the Google Play title. That doesn't affect the app name when displayed on the device.



[TOPIC: post.html]
#46

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

Oh I see... I didn't consider about the title in the device for this issue.

 

It's still an issue then.



[TOPIC: post.html]
#47

toga

[GLOBAL: userInfoPane.html]
toga
  • Contributor

  • 103 posts
  • Corona SDK

Any news on this?

App Name localization for Android is a MUST. A framework without such a feature is a NO GO. Is there any timeframe for supporting this in corona? If not i have to change to another framework like cocos2d-x.

Any news are very appreciated.

 

Thanks from a very frustrated corona fan.



[TOPIC: post.html]
#48

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

@toga

 

For this to be considered by CoronaLabs we'll have to vote for the feature here:

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/5287714-localization-support-for-android-icon-app-title-

 

At the moment it has nearly 80 votes, but I don't know how far up on CoronaLabs' list those votes take it.

 

I'm Enterprise so I can already do it myself, however I consider this a basic feature that should be implemented sooner rather than later so everybody can take advantage of true localisation.



[TOPIC: post.html]
#49

toga

[GLOBAL: userInfoPane.html]
toga
  • Contributor

  • 103 posts
  • Corona SDK

Hi Ingemar,

i have already voted for it month ago. 

It is sad that we have to vote for a core functionality. There are a lot of languages in the world and a good framework has to support multi languages.



[TOPIC: post.html]
#50

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,779 posts
  • Enterprise

We have a very full queue of things going on right now that the community is going to like.  Once we knock these out, I'll try to get some attention on this.  Every thing is a cost-benefit analysis.   My Android-fu isn't great but my understanding is that this isn't easy from doing with in SDK.  The more votes for this the better.

 

Rob




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