-
Notifications
You must be signed in to change notification settings - Fork 33
Support for Android Apps / APK Localization (strings.xml) #401
Comments
+1...its a must to build localized apps for Google Play |
+1 ) |
+1! |
+1 |
6 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
PGB has added beta support for Android localization files. To add, create directory locales/android/ in the root of your PGB application zip / repo, and place your localization files there. The contents will be copied into the Android res/ directory, and any nested sub-directory structures will persist. Here's an example of how these files will be compiled into your APK:
Existing directories will be merged, but at this time any individual files you include will overwrite their target if it exists, so if any of your plugins have matching localization files, you'll need to merge them into your own locales directory manually. iOS notes Note that its a beta feature; try it out and let us know. Side note: it seems to be implied above that adding localization files will add that to your supported locales in the Play store, however from my research and testing, the contents of your translation files will not affect this, you must manually select your locales when uploading your app. |
hi @wildabeast [Q1] [Q2] |
@bau720123 the default content is whatever is created by the cordova cli, which you can see here. strings.xml and custom.xml are just examples ... you can add whatever files you need. check out the android resource docs for what you might want to have in the as mentioned in the iOS notes above, if you're only using iOS locales you can put your content in either |
ok |
Closing re above solution. |
Hi, @wildabeast is this "beta" support continues ? I've tested with on PGB with cli-6.1.0 it works for android but cannot do it work for iOS. I'm trying to localize app_name adding local.strings files -- www The content of the local.strings file are : Should I add stg on config.xml ? I've tried adding following config without success: <config-file parent="CFBundleLocalizations" mode="replace">
<array>
<string>pt</string>
<string>en</string>
</array>
</config-file> Thanks for your help |
I've opened a ticket concerning this issue to adobe support |
@wildabeast Hi, can you comment on continued support for the beta feature you describe above or suggest alternatives if it is no longer supported with newer versions of PGB? There does not seem to be support for the |
Android Apps (APK) build with PGB do not contain any localization files. Because of this, the google play store marks them as "available in standard locale only".
For iOS Apps (IPA) a simple mechanism is offered by PGB. Place local.strings files in locale specific folders below www folder like this:
-- www
--- locales
---- en
----- local.strings
The content of the local.strings files may be :
"DummyKey" = "Dummyvalue";
The iOS solution is described here: http://community.phonegap.com/nitobi/topics/problem_with_binary_details_ios_localization_builded_with_phonegap_build
We need a comparable android solution. We could e.g. place an additonal folder tree below www folder:
-- www
--- res
---- values
----- strings.xml
---- values-en
----- strings.xml
---- values-de
----- strings.xml
PGB should then copy the res folder one level up when assembling the apk. The folder could be identified by ist name "res" (as it is done for the above mentioned iOS solution for the name "locales") or by a special configuration tag/directive in config.xml (see #386 ) which is obviously the smarter solution.
The text was updated successfully, but these errors were encountered: