diff --git a/package.json b/package.json index db1eabd0..3dacb8c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "translatium", "description": "Google Translate client for macOS & Windows", - "version": "8.6.0", + "version": "8.6.1", "main": "public/electron.js", "repository": "https://github.com/quanglam2807/translatium", "author": { diff --git a/src/constants/display-languages.js b/src/constants/display-languages.js index e097e609..eb63b4b9 100644 --- a/src/constants/display-languages.js +++ b/src/constants/display-languages.js @@ -14,7 +14,7 @@ export default { vi: { displayName: 'Tiếng Việt', }, - zh: { + zh_CN: { displayName: '中文', }, }; diff --git a/src/helpers/get-default-lang-id.js b/src/helpers/get-default-lang-id.js index 98547d6e..ccd36955 100644 --- a/src/helpers/get-default-lang-id.js +++ b/src/helpers/get-default-lang-id.js @@ -5,7 +5,7 @@ import displayLanguages from '../constants/display-languages'; // strip country code from langId // en-US => en / vi-vn => vi const getLanguageCode = (langId) => { - const parts = langId.toLowerCase().split('-'); + const parts = langId.toLowerCase().replace('_', '-').split('-'); return parts[0]; };