Skip to content

Commit a1022a9

Browse files
author
黄家祥
committed
feature: Supports reading language from environment variables, which makes it easy to modify the language after packaging into a Docker image
1 parent 76a19d2 commit a1022a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugins/i18n.plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createI18n } from 'vue-i18n';
55

66
const i18n = createI18n({
77
legacy: false,
8-
locale: 'en',
8+
locale: import.meta.env.VITE_LANGUAGE || 'en',
99
messages,
1010
});
1111

0 commit comments

Comments
 (0)