pushandplay / cordova-plugin-apprate

This plugin provide the "rate this app" functionality into your Cordova/Phonegap application
Apache License 2.0
299 stars 193 forks source link

Locale issue #288

Open Joe-song-77 opened 3 years ago

Joe-song-77 commented 3 years ago

See method Locales.addLocale in locales.js, the key was language. But, the window.navigator.language will give 'zh-tw' if I choose device language as 'Chinese, Traditional(Taiwan)' and region as China mainland. It will let the declared locale 'zh-TW' can't be found. So, not sure if the lowercase language should be used as the key. E,g, locales[localeObject.language.toLowerCase()] = localeObject;

Also, I just wonder if the locale 'zh-cn', 'hu' and 'nb' can be provided by default.

Could you please evaluate this? Thanks!

westonganger commented 3 years ago

Feel free to create PR's for the additional locales and for the lowercase fix.

benjamincreativedk commented 3 years ago

Have same issue when using customLocal these lines are ignored: yesButtonLabel: "Ja!", noButtonLabel: "Ikke rigtigt", appRatePromptTitle: 'Kan du lide %@?', I know they don't exists in the locales.js for "da", like Joe-song-77 mentions about Chinese. But it looks like it can't be overruled by customLocal: {} ...