2020-09-18 20:43:19 +02:00
|
|
|
// For documentation on i18n in Zulip, see:
|
|
|
|
// https://zulip.readthedocs.io/en/latest/translating/internationalization.html
|
|
|
|
|
2020-07-15 01:29:15 +02:00
|
|
|
import i18next from "i18next";
|
2016-05-13 12:44:03 +02:00
|
|
|
|
2021-03-25 22:35:45 +01:00
|
|
|
import {page_params} from "./page_params";
|
|
|
|
|
2018-05-30 18:14:20 +02:00
|
|
|
i18next.init({
|
2020-07-15 01:29:15 +02:00
|
|
|
lng: "lang",
|
2018-05-30 18:14:20 +02:00
|
|
|
resources: {
|
|
|
|
lang: {
|
|
|
|
translation: page_params.translation_data,
|
2018-05-29 12:34:59 +02:00
|
|
|
},
|
2018-05-30 18:14:20 +02:00
|
|
|
},
|
|
|
|
nsSeparator: false,
|
|
|
|
keySeparator: false,
|
|
|
|
interpolation: {
|
|
|
|
prefix: "__",
|
|
|
|
suffix: "__",
|
|
|
|
},
|
2020-07-16 23:29:01 +02:00
|
|
|
returnEmptyString: false, // Empty string is not a valid translation.
|
2018-05-30 18:14:20 +02:00
|
|
|
});
|
2016-06-10 09:03:36 +02:00
|
|
|
|
2021-03-25 21:38:40 +01:00
|
|
|
export const i18n = i18next;
|