vocdoni / ui-components

Vocdoni UI components libs
GNU General Public License v3.0
3 stars 2 forks source link

date-fn functions locales are not handled #66

Closed elboletaire closed 1 year ago

elboletaire commented 1 year ago

And due to how it works with date-fns, the only way I'm currently thinking to make it extensible is to search for language definitions in a global scope (aka window).

So the idea would be to create the functions trying to fetch the language translations from window._datefns_locale (or similar). I'm not sure how will this behave when we change languages, but I'll have to give it a try, since doing it this way is the only way I can think without embedding all the language packs of date-fns to the bundled file.

Related to #61 (this will probably be a blocker of that one).

elboletaire commented 1 year ago

Oooooor, we could reuse the TranslationsProvider we already have for this.. I'll have to give it "a couple of turns" to properly see it.

elboletaire commented 1 year ago

closed by e6cfaa9c4bf6b0c370b75a9513ff79760999f792