Issues with es-419 (latin america) culture on Android.
Closed this issue · 3 comments
Hi there, this plugin is great!. I have run into an interesting cross-platform problem though. When localizing an app for Latin American countries which use Latin American Spanish, it is pretty common to support es-419. iOS will actually return this culture to you and builds just fine when creating a es-419.json
resource file.
Android unfortunately, does not support that culture on OS versions below 7.0 I believe. When trying to run tns build android
it's failing due to there being an android resource name values-es-r419
.
platforms/android/app/src/main/res/values-es-r419: Error: Invalid resource directory name
Do you know of a work-around for this? If I change it to es-mx or es-us then the build succeeds but then it will not work properly on iOS.
Appreciate any help.
I don't know any workaround. The best way I can think of right now would be to modify the plugin in order to enable .ios
or .android
file extension for i18n files.
Ok thanks for the info. I'll go ahead and close the issue.
The naming should be values-b+es+419
See https://developer.android.com/guide/topics/resources/multilingual-support#postN
The -b<locale_using_+_as_separator>
convention should be used for everything that is not 2 char language or 2 char language + 2 char region.
So
values-fr
values-fr-rCH
But
values-b+es+419
values-b+zh+Hant
values-b+sr+Latn+RS