16 lines
280 B
Python
16 lines
280 B
Python
|
from logger.logger import *
|
||
|
import tomllib
|
||
|
|
||
|
l_obj = {}
|
||
|
|
||
|
|
||
|
def load_lang(lang: str):
|
||
|
info(f"[lang]load lang: {lang}")
|
||
|
global l_obj
|
||
|
with open("lang/"+lang+".toml", "rb") as file:
|
||
|
l_obj = tomllib.load(file)
|
||
|
|
||
|
|
||
|
def l(strs):
|
||
|
return l_obj.get(strs, f"__{strs}__")
|