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

DatePipe & DecimalPipe #542

Open
Danubius1st opened this issue Oct 18, 2020 · 1 comment
Open

DatePipe & DecimalPipe #542

Danubius1st opened this issue Oct 18, 2020 · 1 comment

Comments

@Danubius1st
Copy link

I need to read dates and numbers from a json file and dynamically change locale format.
Would be nice to add localized DatePipe and DecimalPipe in an example.

@millbj92
Copy link
Contributor

millbj92 commented Aug 7, 2021

This is probably a better question to ask on the actual package used to translate. This package is meant to be a starter package for clean code with just some fun examples thrown in. i18n does not have a standard for dates or currencies, as far as I know. Best bet is to write your own service and pipe, and either keep a massive json file in your assets folder with all the different variants or stick it all in a database, which is what I'd do. If I were hosting this site I'd most likely take the json file from assets and stick it in a NoSQL database somewhere and manually retrieve what's needed. Reallistically speaking, and especially in enterprise situations, web applications tend to grow, and with it you'd have to maintain an up-to-date translation file. All that being said, machine learning coupled with cloud services will most likely replace keeping up with i18n files sooner or later.

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

2 participants