mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-12-24 18:45:49 +01:00
e1783cf083
GitOrigin-RevId: bd0dedac08c982ccabacfb2e61f66aac35703acb
20 lines
394 B
Python
20 lines
394 B
Python
from library.configurator import Configurator
|
|
|
|
|
|
def get_translations():
|
|
return Configurator([
|
|
'nexus/translations/translations.yaml',
|
|
])
|
|
|
|
|
|
def t(label, language='en'):
|
|
if language in _translations and label in _translations[language]:
|
|
return _translations[language][label]
|
|
return _translations['en'][label]
|
|
|
|
|
|
_translations = get_translations()
|
|
|
|
|
|
__all__ = ['t']
|