fix: misc

This commit is contained in:
Ibrahima G. Coulibaly
2025-07-13 11:25:05 +01:00
parent 035eb2edd1
commit 21c4f44d4e
121 changed files with 987 additions and 837 deletions

View File

@@ -24,50 +24,59 @@ import enTime from '../pages/tools/time/i18n/en.json';
import hiTime from '../pages/tools/time/i18n/hi.json';
import enXml from '../pages/tools/xml/i18n/en.json';
import hiXml from '../pages/tools/xml/i18n/hi.json';
import Backend from 'i18next-locize-backend';
const locizeOptions = {
projectId: 'e7156a3e-66fb-4035-a0f0-cebf1c63a3ba', // Replace with your Locize project ID
apiKey: import.meta.env.LOCIZE_API_KEY, // Replace with your Locize API key
referenceLng: 'en',
version: 'latest'
};
// Merge translations for demonstration; in a real app, use namespaces
const resources = {
en: {
translation: {
...enGlobal,
list: enList,
string: enString,
csv: enCsv,
json: enJson,
pdf: enPdf,
image: enImage,
audio: enAudio,
video: enVideo,
number: enNumber,
time: enTime,
xml: enXml
}
translation: enGlobal,
list: enList,
string: enString,
csv: enCsv,
json: enJson,
pdf: enPdf,
image: enImage,
audio: enAudio,
video: enVideo,
number: enNumber,
time: enTime,
xml: enXml
},
hi: {
translation: {
...hiGlobal,
list: hiList,
string: hiString,
csv: hiCsv,
json: hiJson,
pdf: hiPdf,
image: hiImage,
audio: hiAudio,
video: hiVideo,
number: hiNumber,
time: hiTime,
xml: hiXml
}
translation: hiGlobal,
list: hiList,
string: hiString,
csv: hiCsv,
json: hiJson,
pdf: hiPdf,
image: hiImage,
audio: hiAudio,
video: hiVideo,
number: hiNumber,
time: hiTime,
xml: hiXml
}
};
i18n.use(initReactI18next).init({
resources,
lng: 'en',
fallbackLng: 'en',
interpolation: {
escapeValue: false
}
});
i18n
.use(Backend)
.use(initReactI18next)
.init({
resources,
lng: 'en',
fallbackLng: 'en',
interpolation: {
escapeValue: false
},
backend: locizeOptions,
saveMissing: true, // Send missing keys to Locize
updateMissing: true // Update keys in Locize
});
export default i18n;