How to use the default function from i18next

Find comprehensive JavaScript i18next.default code examples handpicked from public code repositorys.

43
44
45
46
47
48
49
50
51
52
this.mongooseClient = mongoose_1.default;
this.applyMiddleware();
this.routes();
this.connectDB();
// container.get<Subscribers>(TYPES.Subscribers)
i18next_1.default
    .use(i18next_fs_backend_1.default)
    .use(i18next_http_middleware_1.default.LanguageDetector)
    .init({
    backend: {
fork icon0
star icon0
watch icon0

122
123
124
125
126
127
128
129
130
131
  translations: (0, _config.combineTranslations)(defaultTranslations, (_this$options$locale2 = this.options.locale) === null || _this$options$locale2 === void 0 ? void 0 : _this$options$locale2.translations),
  language
};

if (_i18next.default.isInitialized) {
  _i18next.default.addResourceBundle(this.locale.language, 'translation', this.locale.translations);
} else {
  _i18next.default.init({
    lng: this.locale.language,
    initImmediate: false,
fork icon0
star icon0
watch icon0