From f174fcc9b111ba285ba3b10ff4642f8163064f6f Mon Sep 17 00:00:00 2001 From: MarvNC Date: Fri, 19 Jan 2024 16:25:30 -0800 Subject: [PATCH] Add langCode property to language objects --- src/constants.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/constants.js b/src/constants.js index 1bf8213..8c3d297 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,62 +1,76 @@ /** - * @type {Record} + * @type {Record} */ const languages = { yue: { name: '廣東話', shortName: '粵', + langCode: 'yue', }, eng: { name: '英文', shortName: '英', + langCode: 'en', }, zho: { name: '中文', shortName: '中', + langCode: 'zh-Hant', }, jpn: { name: '日文', shortName: '日', + langCode: 'ja', }, kor: { name: '韓文', shortName: '韓', + langCode: 'ko', }, vie: { name: '越南文', shortName: '越', + langCode: 'vi', }, lzh: { name: '文言文', shortName: '文', + langCode: 'zh-Hant', }, por: { name: '葡萄牙文', shortName: '葡', + langCode: 'pt', }, deu: { name: '德文', shortName: '德', + langCode: 'de', }, fra: { name: '法文', shortName: '法', + langCode: 'fr', }, mnc: { name: '滿文', shortName: '滿', + langCode: 'mnc', }, lat: { name: '拉丁文', shortName: '拉', + langCode: 'la', }, tib: { name: '藏文', shortName: '藏', + langCode: 'bo', }, 量詞: { name: '量詞', shortName: '量詞', + langCode: '', }, };