flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

Datepicker locale

Open DanielCambray opened this issue 3 years ago • 22 comments

Hi,

I have installed the datepicker from then CDN and it works just fine. I can change the format with datepicker-format="dd/mm/yyyy". I try now to change the locale with datepicker-locale="fr-FR" and/or datepicker-language="fr". But the locale is still "en". Did I miss something ?

Thanks.

DanielCambray avatar Dec 10 '21 06:12 DanielCambray

Hey @DanielCambray,

We'll address this issue in the v1.2.1 update.

https://github.com/themesberg/flowbite/projects/1

zoltanszogyenyi avatar Dec 10 '21 21:12 zoltanszogyenyi

Has this been resolved in 1.3.0?

bjorntj avatar Jan 18 '22 08:01 bjorntj

Hi, I am impressed with the design and I am considering purchasing a pro version, but I have a question regarding the code content. Does the pro version include exactly the same files as are free? Because I wanted to use your calendar component in my project today and... it didn't work very well.

I noticed the visual messes that were reported on other issues a while ago, as well as those wretched translations that can't be set.

From what I can see, the whole problem lies in the file base-locales.js, which is only English. My client is from Poland, so I needed a translation that is added but not used.

import {locales} from './i18n/base-locales.js';

MichalPniak avatar Apr 07 '22 11:04 MichalPniak

Hi, I am impressed with the design and I am considering purchasing a pro version, but I have a question regarding the code content. Does the pro version include exactly the same files as are free? Because I wanted to use your calendar component in my project today and... it didn't work very well.

I noticed the visual messes that were reported on other issues a while ago, as well as those wretched translations that can't be set.

From what I can see, the whole problem lies in the file base-locales.js, which is only English. My client is from Poland, so I needed a translation that is added but not used.

import {locales} from './i18n/base-locales.js';

Did you find any solution to translate ? I couldn't translate it.

erenergul avatar May 01 '22 16:05 erenergul

I have not found any solution, I just remember that you would have to overwrite the file where the languages are imported for this plugin. When I analyzed it some time ago, only the English language was being import.

MichalPniak avatar May 14 '22 18:05 MichalPniak

Hi!, this feature will be released in short term? I'm also using the CDN and I want to change the language with Spanish

switch-coders avatar Jan 15 '23 21:01 switch-coders

Hi, I'm having the same problem too, I'm not able to change the language. I have checked the last release 1.6.3 and it is not solving this

cotufaloschiflones avatar Jan 25 '23 14:01 cotufaloschiflones

I'm trying this solution and it's working on my code ( Laravel )

  1. Use package flowbite-datepicker
  2. At file app.js
import Datepicker from "flowbite-datepicker/Datepicker";
import vi from "../../node_modules/flowbite-datepicker/js/i18n/locales/vi.js";

const datepickerEl = document.getElementById('datepickerId');
Datepicker.locales.vi = vi.vi;
new Datepicker(datepickerEl, {
   language: 'vi',
   format: 'dd/mm/yyyy'
});

Fadev99 avatar Feb 07 '23 09:02 Fadev99