mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2026-03-13 09:31:31 +08:00
Update the i18n language file init location (#934)
This commit is contained in:
@@ -1,7 +1 @@
|
||||
from backend.common.i18n import i18n
|
||||
|
||||
__version__ = '1.11.0'
|
||||
|
||||
|
||||
# 初始化 i18n
|
||||
i18n.load_locales()
|
||||
|
||||
@@ -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:
|
||||
"""加载语言文本"""
|
||||
|
||||
Reference in New Issue
Block a user