kelvinhokk / cordova-plugin-localization-strings

Cordova Plugin for Localization of Strings on the App
MIT License
119 stars 106 forks source link

Android: Get and apply defaultlocale #66

Closed ath0mas closed 2 years ago

ath0mas commented 2 years ago

To match your Cordova project default strings not in English, this PR adds new behavior:

  1. read the value possibly set for the defaultlocale attribute on your <widget> in config.xml - that Cordova only seems to use for iOS and Windows
  2. use it in getLocalStringXmlPath instead of the hardcoded 'en'

Fix #59.

rodrigograca31 commented 2 years ago

4.1.1 was published with this feature and the engines "bug fix"

ath0mas commented 2 years ago

Maybe add a line to describe this "trick" in the Readme?

Fine if you do it, or do you want me to push a PR? (together with the Readme changes from #67)

rodrigograca31 commented 2 years ago

please send a PR with the what you think its best :)

ath0mas commented 2 years ago

please send a PR with the what you think its best :)

See #68 please ;)