diff --git a/__pycache__/localization.cpython-310.pyc b/__pycache__/localization.cpython-310.pyc new file mode 100644 index 0000000..35ccfef Binary files /dev/null and b/__pycache__/localization.cpython-310.pyc differ diff --git a/localization.py b/localization.py new file mode 100644 index 0000000..8310715 --- /dev/null +++ b/localization.py @@ -0,0 +1,9 @@ +def getlstr(lang, strname): + + # ======== RUSSIAN ======== + if lang == "ru" and strname == "test": + return "Привет, мир!" + + # ======== ENGLISH ======== + if lang == "en" and strname == "test": + return "Hello, world!" \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..aa46772 --- /dev/null +++ b/main.py @@ -0,0 +1,4 @@ +import localization as lang + +print(lang.getlstr("ru", "test")) +print(lang.getlstr("en", "test")) \ No newline at end of file