The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/server/lib/i18n.ts

22 lines
701 B

import type { RocketchatI18nKeys } from '@rocket.chat/i18n';
import i18nDict from '@rocket.chat/i18n';
import { i18n } from '../../app/utils/lib/i18n';
void i18n.init({
lng: 'en',
defaultNS: 'core',
resources: Object.fromEntries(Object.entries(i18nDict).map(([key, value]) => [key, { core: value }])),
initImmediate: true,
});
declare module 'i18next' {
// eslint-disable-next-line @typescript-eslint/naming-convention
interface TFunction {
(key: RocketchatI18nKeys, options?: TOptions): string;
(key: RocketchatI18nKeys, ...options: unknown[]): string;
<T>(key: T extends string ? (T extends RocketchatI18nKeys ? T : never) : never, options?: TOptions): string;
}
}
export { i18n };