Topic: Need to translate the time picker

marrielle.aboujaoude free asked 3 years ago


https://mdbootstrap.com/docs/react/forms/date-picker translate the time picker to Vietnamese language


Piotr Glejzer staff commented 3 years ago

you can use props like okLabel, todayLabel to change the names of labels etc


marrielle.aboujaoude free commented 3 years ago

but what i need is to translate the months to vietnamese, how can I do that?


Piotr Glejzer staff commented 3 years ago

did you try to use props locale? https://mdbootstrap.com/docs/react/forms/date-picker/#docsTabsAPI


marrielle.aboujaoude free commented 3 years ago

                            <MDBDatePicker
                                className="add-campaign-datepickers"
                                getValue={value => this.getPickerValue("endDate", value)}
                                id="endDate"
                                name="endDate"
                                format="YYYY-MM-DD"
                                valueDefault={this.state.endDate}
                                value={this.state.endDate}
                                label={translateFn("End Date")}
                                okLabel = {translateFn("Ok")}
                                locale={moment.locale('ar')}
                            />

i'm using this not working


Piotr Glejzer staff commented 3 years ago

What's not working? I used locale and this is translate langugae to arabic



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: desktop
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: Yes