Added logic to load translations and to translate texts

This commit is contained in:
2022-06-29 20:03:13 +02:00
parent 39b6ca790c
commit e4f843829f
22 changed files with 204 additions and 30 deletions

View File

@@ -0,0 +1,22 @@
from abc import ABC, abstractmethod
class TranslationServiceABC(ABC):
@abstractmethod
def __init__(self): pass
@abstractmethod
def set_default_lang(self, lang: str): pass
@abstractmethod
def set_lang(self, lang: str): pass
@abstractmethod
def load(self, lang: str): pass
@abstractmethod
def load_by_settings(self): pass
@abstractmethod
def translate(self, key: str) -> str: pass