Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Translate #42

Closed
cristhianDt opened this issue May 18, 2018 · 2 comments
Closed

Translate #42

cristhianDt opened this issue May 18, 2018 · 2 comments

Comments

@cristhianDt
Copy link

How can I change/translate the texts?

@BlackMambaCH
Copy link

BlackMambaCH commented Jun 4, 2018

Hi, I just had the same challenge. I did it like this:

All time specific things with configuration of moment.js (see MomentJS Customization)
moment.locale('de');

Some texts can be overruled within the daterangepicker initialization:
$('#daterange').daterangepicker({ minDate: ..., maxDate: ..., locale: { applyButtonTitle: 'Speichern', cancelButtonTitle: 'Abbrechen', endLabel: 'Ende', startLabel: 'Start' }, ...

And others need to be updated with jQuery:
var periods = $('.daterangepicker ul.periods > li.period'); var day = periods.eq(0); var week = periods.eq(1); var month = periods.eq(2); var quarter = periods.eq(3); var year = periods.eq(4); day.text("Tag"); week.text("Woche"); month.text("Monat"); quarter.text("Quartal"); year.text("Jahr");

Hope that helps :)

@cristhianDt
Copy link
Author

Thanks @BlackMambaCH 👍 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants