From a1022a947dc221558b8860d2480ef0281824fea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AE=B6=E7=A5=A5?= Date: Wed, 17 Jul 2024 16:59:40 +0800 Subject: [PATCH] feature: Supports reading language from environment variables, which makes it easy to modify the language after packaging into a Docker image --- src/plugins/i18n.plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/i18n.plugin.ts b/src/plugins/i18n.plugin.ts index f3e8f0e5..42f15faa 100644 --- a/src/plugins/i18n.plugin.ts +++ b/src/plugins/i18n.plugin.ts @@ -5,7 +5,7 @@ import { createI18n } from 'vue-i18n'; const i18n = createI18n({ legacy: false, - locale: 'en', + locale: import.meta.env.VITE_LANGUAGE || 'en', messages, });