0

Is there any possible way to change locale of application without altering number formatting ?

For instance, I want change locale of app to Arabic/Persian language but keep digits to be in English format (123456...), and not been in Arabic style (۱۲۳۴۵۶...).

noted: setting number format for specific string (textview/edittext) will not solve my issue and it is necessary to set number format in one place for the app (like how we set locale).

  • You can use regex to solve this problem as explained [here](https://stackoverflow.com/a/273144/12971639) – sandeep dhami Apr 18 '20 at 11:26
  • as I noted, this won't help me. I need to config it in one place in order to affect all classes of project ( esp for libraries which I have no access for modifying them ) – Farrokh Shahriari Apr 18 '20 at 11:38

1 Answers1

0

You can make your own common text view which extends TextView and implement regex functionality there.

sandeep dhami
  • 188
  • 1
  • 10