MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / t

Function t

app/utils/i18n.py:183–191  ·  view source on GitHub ↗

获取翻译文本

(key: str, lang: str = None)

Source from the content-addressed store, hash-verified

181
182
183def t(key: str, lang: str = None) -> str:
184 """获取翻译文本"""
185 if lang is None:
186 lang = DEFAULT_LANG
187
188 if lang not in TRANSLATIONS:
189 lang = "zh"
190
191 return TRANSLATIONS[lang].get(key, key)
192
193
194def set_language(lang: str):

Callers 8

build_wan21_componentsFunction · 0.90
build_wan22_componentsFunction · 0.90
build_video_pageFunction · 0.90
update_model_componentsFunction · 0.90
build_image_pageFunction · 0.90
build_uiFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected