mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 11:18:26 +02:00
9 lines
No EOL
290 B
Python
9 lines
No EOL
290 B
Python
import json
|
|
|
|
def translate(self, text):
|
|
with open("./translation.json", encoding="utf-8") as f:
|
|
translation = json.load(f)
|
|
if self.language in translation:
|
|
_lang_trad = translation[self.language]
|
|
if text in _lang_trad: return _lang_trad[text]
|
|
return text |