diff --git a/backend/__init__.py b/backend/__init__.py index caa007359..da77e85c6 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -1,7 +1 @@ -from backend.common.i18n import i18n - __version__ = '1.11.0' - - -# 初始化 i18n -i18n.load_locales() diff --git a/backend/common/i18n.py b/backend/common/i18n.py index a94d39b37..771e3d02a 100644 --- a/backend/common/i18n.py +++ b/backend/common/i18n.py @@ -16,6 +16,7 @@ class I18n: def __init__(self) -> None: self.locales: dict[str, dict[str, Any]] = {} self.current_language: str = settings.I18N_DEFAULT_LANGUAGE + self.load_locales() def load_locales(self) -> None: """加载语言文本"""