File size: 377 Bytes
f56a29b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import i18n from './config';
export { type Locale, defaultLocale } from './types';
export { type LocaleEntry, supportedLocales } from './locales';
export type TranslationKey = string;
export function translate(locale: string, key: string): string {
return i18n.t(key, { lng: locale });
}
export function getClientTranslation(key: string): string {
return i18n.t(key);
}
|