moment.js: Set language on initialization

closes #544 (Translation error german / english mix)
main
Igor Scheller 6 years ago
parent 97bab8e063
commit 7b3901211a

@ -5,6 +5,8 @@
*/ */
$(document).ready(function () { $(document).ready(function () {
if (typeof moment !== 'undefined') { if (typeof moment !== 'undefined') {
moment.locale($('html').attr('lang'));
$.each($('.moment-countdown'), function (i, e) { $.each($('.moment-countdown'), function (i, e) {
var span = $(e); var span = $(e);
var text = span.html(); var text = span.html();

@ -9,10 +9,6 @@ require('./forms');
require('./sticky-headers'); require('./sticky-headers');
require('./moment-countdown'); require('./moment-countdown');
$(function () {
moment.locale($('html').attr('lang'));
});
$.ajaxSetup({ $.ajaxSetup({
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')} headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}
}); });

Loading…
Cancel
Save