moment.js: Set language on initialization
closes #544 (Translation error german / english mix)
This commit is contained in:
parent
97bab8e063
commit
7b3901211a
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
$(document).ready(function () {
|
||||
if (typeof moment !== 'undefined') {
|
||||
moment.locale($('html').attr('lang'));
|
||||
|
||||
$.each($('.moment-countdown'), function (i, e) {
|
||||
var span = $(e);
|
||||
var text = span.html();
|
||||
|
|
|
@ -9,10 +9,6 @@ require('./forms');
|
|||
require('./sticky-headers');
|
||||
require('./moment-countdown');
|
||||
|
||||
$(function () {
|
||||
moment.locale($('html').attr('lang'));
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue