cartodb-4.42/lib/assets/javascripts/new-dashboard/i18n/backbone-i18n.js
2024-04-06 05:25:13 +00:00

21 lines
608 B
JavaScript

import deepObjectExtend from 'new-dashboard/utils/deep-object-extend';
var ACTIVE_LOCALE = 'en';
if (ACTIVE_LOCALE !== 'en') {
require('moment/locale/' + ACTIVE_LOCALE);
}
var Locale = require('locale/index');
var Polyglot = require('node-polyglot');
// Override original translation strings
const overrideTranslationStrings = require('./locales/en.overrides.json');
Locale.en = deepObjectExtend(Locale.en, overrideTranslationStrings);
var polyglot = new Polyglot({
locale: ACTIVE_LOCALE, // Needed for pluralize behaviour
phrases: Locale[ACTIVE_LOCALE]
});
window._t = polyglot.t.bind(polyglot);