0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00
logto/packages/phrases/src/index.ts

27 lines
887 B
TypeScript
Raw Normal View History

import { NormalizeKeyPaths } from '@silverhand/essentials';
import en from './locales/en';
import fr from './locales/fr';
import koKR from './locales/ko-kr';
import trTR from './locales/tr-tr';
import zhCN from './locales/zh-cn';
import { Resource, Language } from './types';
export { Language, languageOptions, languageEnumGuard } from './types';
export type Translation = typeof en.translation;
export type Errors = typeof en.errors;
export type LogtoErrorCode = NormalizeKeyPaths<Errors>;
2021-08-14 21:39:37 +08:00
export type LogtoErrorI18nKey = `errors:${LogtoErrorCode}`;
export type I18nKey = NormalizeKeyPaths<Translation>;
export type AdminConsoleKey = NormalizeKeyPaths<typeof en.translation.admin_console>;
const resource: Resource = {
[Language.English]: en,
[Language.French]: fr,
[Language.Chinese]: zhCN,
[Language.Korean]: koKR,
[Language.Turkish]: trTR,
};
export default resource;