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

Datepicker locale #32

Open
DanielCambray opened this issue Dec 10, 2021 · 8 comments
Open

Datepicker locale #32

DanielCambray opened this issue Dec 10, 2021 · 8 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request v1.6.3 Issues and tasks for v1.6.3 release
Projects

Comments

@DanielCambray
Copy link

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.

@zoltanszogyenyi
Copy link
Member

zoltanszogyenyi commented Dec 10, 2021

Hey @DanielCambray,

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

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

@zoltanszogyenyi zoltanszogyenyi added this to To do in v1.3.4 Dec 10, 2021
@zoltanszogyenyi zoltanszogyenyi added enhancement New feature or request documentation Improvements or additions to documentation labels Dec 13, 2021
@zoltanszogyenyi zoltanszogyenyi self-assigned this Dec 13, 2021
@bjorntj
Copy link

bjorntj commented Jan 18, 2022

Has this been resolved in 1.3.0?

@MichalPniak
Copy link

MichalPniak commented Apr 7, 2022

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';

@erenergul
Copy link

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.

@MichalPniak
Copy link

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.

@zoltanszogyenyi zoltanszogyenyi added the v1.6.3 Issues and tasks for v1.6.3 release label Dec 7, 2022
@switch-coders
Copy link

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

@cotufaloschiflones
Copy link

cotufaloschiflones commented Jan 25, 2023

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

@devuitton
Copy link

devuitton commented Feb 7, 2023

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'
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request v1.6.3 Issues and tasks for v1.6.3 release
Projects
v1.3.4
To do
Development

No branches or pull requests

8 participants