Does Corona support App Name localization?

Couldn’t find a feature request so put one here:

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

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

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 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.

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

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  

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.

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?  

Couldn’t find a feature request so put one here:

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

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

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 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.

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

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  

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.

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.

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  

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.

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  

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 ofgreg886

Any ideas?