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

Dates translation - localize moment library #822

Open
samuelsov opened this issue Sep 14, 2021 · 0 comments
Open

Dates translation - localize moment library #822

samuelsov opened this issue Sep 14, 2021 · 0 comments

Comments

@samuelsov
Copy link

samuelsov commented Sep 14, 2021

The library moment should be translated based on the current CiviCRM locale.

I have done some tests and it requires 2 steps:

  • use moment-with-locale.min.js instead of moment.min.js
  • for each use of moment().xx() , use moment().locale(currentLocale).xx()

Ideally, we should have only one place to instantiate moment with the proper locale rather than adding locale() everywhere.

A sample with sidebar translated :

ksnip_20210913-142603

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