mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-10 08:11:34 +00:00
293c0b604d
* Add SVG icons for map pins * Add federation basis and new coordinator form (#793) * Add new coordinator entry issue form * Add Federation basis * Fix eslint errors from F2F and fix languages * Redo eslint @typescript-eslint/strict-boolean-expressions * Robot Page working * Contexts Working * Garage Working * CurrentOrder working * Federation model working --------- Co-authored-by: Reckless_Satoshi <reckless.satoshi@protonmail.com> Co-authored-by: Reckless_Satoshi <90936742+Reckless-Satoshi@users.noreply.github.com>
34 lines
1003 B
JavaScript
34 lines
1003 B
JavaScript
import i18n from 'i18next';
|
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
import { initReactI18next } from 'react-i18next';
|
|
import HttpApi from 'i18next-http-backend';
|
|
|
|
const config = {
|
|
backend: {
|
|
loadPath: '/static/locales/{{lng}}.json',
|
|
allowMultiLoading: false, // set loadPath: '/locales/resources.json?lng={{lng}}&ns={{ns}}' to adapt to multiLoading
|
|
crossDomain: false,
|
|
withCredentials: false,
|
|
overrideMimeType: false,
|
|
reloadInterval: false, // can be used to reload resources in a specific interval (useful in server environments)
|
|
},
|
|
fallbackLng: 'en',
|
|
debug: false,
|
|
|
|
// have a common namespace used around the full app
|
|
ns: ['translations'],
|
|
defaultNS: 'translations',
|
|
keySeparator: false, // we use content as keys
|
|
interpolation: {
|
|
escapeValue: false,
|
|
formatSeparator: ',',
|
|
},
|
|
react: {
|
|
useSuspense: false,
|
|
},
|
|
};
|
|
|
|
await i18n.use(HttpApi).use(LanguageDetector).use(initReactI18next).init(config);
|
|
|
|
export default i18n;
|