Is it possible to change the language of the date picker ? (LTR like French) #1345
Replies: 4 comments 13 replies
-
@joffreypersia Have a look at this issue #1188 |
Beta Was this translation helpful? Give feedback.
-
And you can find the translate strings here: Lines 51 to 72 in dec010f |
Beta Was this translation helpful? Give feedback.
-
@joffreypersia As I understand it, the So, if your user has their browser set to French, then those labels should be properly rendered in French. |
Beta Was this translation helpful? Give feedback.
-
@joffreypersia thanks for the request! This isn't a feature request as it's a question. If you are unsure about something please open an issue in future. The date-picker does use the browser's locale for date formatting. You can also enforce a specific locale for the calendar/ date-picker by passing But text still needs to be translated by the backend, like the date range preset labels as linked by @jeffchown. There are also translation strings available for the canel and select range/ select date buttons. Again you need to do that on the backend as browsers don't have translation built in. <ui-close>
<flux:button variant="ghost">{{ __('Cancel') }}</flux:button>
</ui-close>
<ui-date-picker-select>
<flux:button variant="primary">
<?php if ($range): ?>
{{ __('Select range') }}
<?php else: ?>
{{ __('Select date') }}
<?php endif; ?>
</flux:button>
</ui-date-picker-select> As I believe everything you are after is already possible, I'm going to close this. Feel free to comment back here if you are still having issues or open an issue if something doesn't work. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I would like to make the date picker support multiple languages, such as French and English.
On
<flux:date-picker mode="range" with-presets />
, is it possible to change the preset strings and also modify the date format in the input button, as well as its locale?Thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions