Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (optional) support for "localizing" numbers #15

Open
jopdeklein opened this issue Feb 14, 2019 · 2 comments
Open

Add (optional) support for "localizing" numbers #15

jopdeklein opened this issue Feb 14, 2019 · 2 comments

Comments

@jopdeklein
Copy link
Contributor

In our applications we deal with multiple currencies, some of which end up longer than our base currency (for example, €100 vs RUB7 554). It would be useful if we can augment particular "numbers" such as currencies in the DOM, to be extended by x characters, in order to simulate currencies that use longer currency codes, or are "inflated" in relation to the base currency used in your project.

@jopdeklein
Copy link
Contributor Author

jopdeklein commented Feb 14, 2019

WIP approach can be found here:
FindHotel#1

Any preliminary feedback is appreciated.

@jopdeklein
Copy link
Contributor Author

I played around with this and while it works, the need arose to be able to white/black list not only on element / tag level, but some form of opt in / out method on element level in order to pseudo localize (or not) particular elements.

In our case currencies benefit from pseudo localization, but most numbers such as the day part of a date end up breaking our UI unnecessarily.

I was thinking of adding support data-pseudolocalize attributes to control the localization of a particular subtree, if I get around to it I'll open another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant