UNPKG

yahoi

Version:

Yet Another Highly Opinionated Isomorphic Framework

77 lines (60 loc) 2.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /* const i18n = require('i18next'); const XHR = require('i18next-xhr-backend'); const LanguageDetector = require('i18next-browser-languagedetector'); const options = { fallbackLng: 'en', load: 'languageOnly', // we only provide en, de -> no region specific locals like en-US, de-DE lng: 'en', // have a common namespace used around the full app debug: true, saveMissing: true, backend: { load:['en'], loadPath: '/Translations/get?lng={{lng}}&ns={{ns}}', addPath: '/Translations/add?lng={{lng}}&ns={{ns}}', crossDomain: true, allowMultiLoading: true }, ns: ['translations'], defaultNS: 'translations', react: { wait: true, exposeNamespace: true }, interpolation: { escapeValue: false, // not needed for react!! formatSeparator: ',', format: (value, format, lng) => { if (format === 'uppercase') return value.toUpperCase(); return value; } } }; // for browser use xhr backend to load translations and browser lng detector if (process.browser) { i18n .use(XHR) // .use(Cache) .use(LanguageDetector); } if (!i18n.isInitialized) i18n.init(options); module.exports = i18n; */ var i18n = function () { function i18n() { _classCallCheck(this, i18n); } _createClass(i18n, [{ key: "test", value: function test() {} }]); return i18n; }(); exports.default = i18n;