plugins icon indicating copy to clipboard operation
plugins copied to clipboard

@nativescript/localize, Android bug, Cannot add language file with region specifier

Open cjohn001 opened this issue 3 years ago • 1 comments

Hello together, I am currently trying to add simple Chinese (zh.json) and traditional Chinese (zh-hant.json) language files to my app using the localize plugin. Both files work as expected when building the ios app. However, with the zh-hant.json file included in the sources I cannot build the android version of my app. I get the following error message:

ERROR:/Users/cjohn/Entwicklung/MND/my-nutri-diary/mnd/platforms/android/app/src/main/res/values-zh-rhant: Resource and asset merger: Invalid resource directory name

Execution failed for task ':app:mergeDebugResources'. /Users/cjohn/Entwicklung/MND/my-nutri-diary/mnd/platforms/android/app/src/main/res/values-zh-rhant: Error: Invalid resource directory name

Would be great if someone could help. Thanks!

cjohn001 avatar Mar 20 '22 12:03 cjohn001

Workaround like described here: https://stackoverflow.com/a/17276279/2270725

Use zh-CN.json for simplified and zh-HK for traditional.

cjohn001 avatar Mar 20 '22 14:03 cjohn001