diff --git a/README.md b/README.md index a47d42e18..958a9d883 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,12 @@ Requires [Node.js](https://nodejs.org/) `^16.13.0` + [PostgreSQL](https://postgr node -e "$(printf "%s" "$(curl -fsSL https://raw.githubusercontent.com/logto-io/logto/HEAD/install.js)")" ``` +## Language support + +```ts +const languages = ['English', '简体中文', 'Türkçe', '한국어']; +``` + ## Bug report, feature request, feedback - Our team takes security seriously, especially when it relates to identity. If you find any existing or potential security issues, please do not hesitate to email 🔒 [security@logto.io](mailto:security@logto.io). diff --git a/packages/phrases-ui/src/types.ts b/packages/phrases-ui/src/types.ts index 2d9483d09..88dd08aa8 100644 --- a/packages/phrases-ui/src/types.ts +++ b/packages/phrases-ui/src/types.ts @@ -14,7 +14,7 @@ export enum Language { export const languageOptions = [ { value: Language.English, title: 'English' }, - { value: Language.Chinese, title: '中文' }, - { value: Language.Turkish, title: 'Turkish' }, + { value: Language.Chinese, title: '简体中文' }, + { value: Language.Turkish, title: 'Türkçe' }, { value: Language.Korean, title: '한국어' }, ]; diff --git a/packages/phrases/src/types.ts b/packages/phrases/src/types.ts index 8c5ef221d..d77236169 100644 --- a/packages/phrases/src/types.ts +++ b/packages/phrases/src/types.ts @@ -1,14 +1,11 @@ -/* eslint-disable @typescript-eslint/consistent-indexed-object-style */ import { z } from 'zod'; /* Copied from i18next/index.d.ts */ export type Resource = Record; -export interface ResourceLanguage { - [namespace: string]: ResourceKey; -} +export type ResourceLanguage = Record; -export type ResourceKey = string | { [key: string]: unknown }; +export type ResourceKey = string | Record; export enum Language { English = 'en', @@ -21,9 +18,7 @@ export const languageEnumGuard = z.nativeEnum(Language); export const languageOptions = [ { value: Language.English, title: 'English' }, - { value: Language.Chinese, title: '中文' }, + { value: Language.Chinese, title: '简体中文' }, { value: Language.Turkish, title: 'Türkçe' }, { value: Language.Korean, title: '한국어' }, ]; - -/* eslint-enable @typescript-eslint/consistent-indexed-object-style */