Explorar o código

create LangWithMeta

yuken %!s(int64=3) %!d(string=hai) anos
pai
achega
70f7dc2eb4
Modificáronse 1 ficheiros con 17 adicións e 0 borrados
  1. 17 0
      packages/core/src/interfaces/lang.ts

+ 17 - 0
packages/core/src/interfaces/lang.ts

@@ -3,5 +3,22 @@ export const Lang = {
   ja_JP: 'ja_JP',
   zh_CN: 'zh_CN',
 } as const;
+export const LangWithMeta = {
+  en_US: {
+    id: 'en_US',
+    displayName: 'English',
+    aliases: ['en'],
+  },
+  ja_JP: {
+    id: 'ja_JP',
+    displayName: '日本語',
+    aliases: ['ja'],
+  },
+  zh_CN: {
+    id: 'zh_CN',
+    displayName: '简体中文',
+    aliases: ['zh', 'zh-HK', 'zh-CN', 'zh-TW', 'zh-hk', 'zh-cn', 'zh-tw'],
+  },
+} as const;
 export const AllLang = Object.values(Lang);
 export type Lang = typeof Lang[keyof typeof Lang];