-
Notifications
You must be signed in to change notification settings - Fork 107
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
Change language countdown #26
Comments
@wpbean Hi, you can edit the javascript code that you use for showing the countdown and add you preferred text. Just replace the words "days, hours, minutes, seconds" with the ones you want. |
@bigdropgr maybe it should be set by option, cause I "gitignored" the whole bower_components. |
Just pass your custom render method into the options of the plugin and handle i18n there. The plugin is purely handling counting down to a certain time and should not include implementation details like i18n or l10n. So in a way @marlenesco is right, you can set it as an option :) // assuming you have a constant LOCALE containing your locale string
$('.yourCountdownContainer').countdown({
date: "June 7, 1016 15:03:26",
render: function(date) {
if (LOCALE === 'de_DE') {
this.el.innerHTML =
date.years + " Jahre, " +
date.days + " Tage, " +
this.leadingZeros(date.hours) + " Stunden, " +
this.leadingZeros(date.min) + " Minuten und " +
this.leadingZeros(date.sec) + " Sekunden";
} else {
this.el.innerHTML =
date.years + " years, " +
date.days + " days, " +
this.leadingZeros(date.hours) + " hours, " +
this.leadingZeros(date.min) + " min and " +
this.leadingZeros(date.sec) + " sec";
}
}
}); |
Thank you @rendro |
I want to change the language of the countdown (days, hours, minutes, seconds). How can I do that?
Thank you
The text was updated successfully, but these errors were encountered: