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

Localization #387

Open
jantrubka opened this issue Jul 1, 2024 · 4 comments
Open

Localization #387

jantrubka opened this issue Jul 1, 2024 · 4 comments

Comments

@jantrubka
Copy link

Hey,
date-fns supports localization do you think it would be possible to have a locale prop in CalendarPicker that would pull corresponding month and week names from date-fns and decide if the week should start by Monday accordingly? The only things that would need to be manually translated are 'previous, next, select year, select month'

@SiddigHope
Copy link

hi @jantrubka
were you able to get the calendar to show from right to left, I'm stuck in this one

@jantrubka
Copy link
Author

What exactly do you mean by show from right to left?

@SiddigHope
Copy link

@jantrubka I mean rendering days from right to left not left to right.
instead of showing 1 2 3 4 5, I want to show 5 4 3 2 1.
the first one is for LTR locales (en, fr, ...), and the second is for RTL locales like (ar, he, fa, ...)

@jantrubka
Copy link
Author

Oh, I see. I haven't dealt with that and quite frankly don't plan to do so anytime soon. I would love to have localization automated in this package but I'm not as skilled of a programmer as I'd need to be to do this myself properly.
However, date fns supports most common languages. Also if you want to code this yourself I'd recommend starting in DaysGridView.js file and specifically generateDaysGrid function

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