Update server injected subpath detection

This commit is contained in:
schroda
2025-09-24 23:13:29 +02:00
parent a2d7091712
commit ad3b8d4567
6 changed files with 54 additions and 97 deletions

View File

@@ -10,7 +10,7 @@ import { use } from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import HttpBackend from 'i18next-http-backend';
import { SubpathConfig } from '@/lib/utils/SubpathConfig.ts';
import { SubpathUtil } from '@/lib/utils/SubpathUtil.ts';
/**
* Keys have to match {@link IsoLanguages} codes, they're used for showing the language name in the dropdown in the {@link Settings}.<br/>
@@ -46,7 +46,7 @@ export const i18n = use(initReactI18next)
fallbackLng: 'en',
backend: {
loadPath: `${SubpathConfig.getSubpath()}/locales/{{lng}}.json`,
loadPath: `${SubpathUtil.getSubpath()}/locales/{{lng}}.json`,
allowMultiLoading: true,
},