Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
import { i18nLocaleSupported } from '@sync-in-server/backend/src/common/i18n'
import {
defineLocale,
caLocale,
deLocale,
esLocale,
frLocale,
hiLocale,
itLocale,
jaLocale,
koLocale,
LocaleData,
nlLocale,
plLocale,
ptBrLocale,
ruLocale,
trLocale,
zhCnLocale
} from 'ngx-bootstrap/chronos'
// Remove explicit 'en' locale definition to prevent translation conflicts
const BOOTSTRAP_LOCALES: Record<Exclude<i18nLocaleSupported, 'en'>, LocaleData> = {
ca: caLocale,
de: deLocale,
es: esLocale,
fr: frLocale,
hi: hiLocale,
it: itLocale,
ja: jaLocale,
ko: koLocale,
nl: nlLocale,
pl: plLocale,
pt: ptBrLocale,
'pt-BR': ptBrLocale,
ru: ruLocale,
tr: trLocale,
zh: zhCnLocale
}
export function loadBootstrapLocale(language: string): void {
const locale: LocaleData = BOOTSTRAP_LOCALES[language]
if (!locale) return
defineLocale(language.toLowerCase(), locale)
}