Answer the question
In order to leave comments, you need to log in
How to choose a language in a telegram bot with 10k+ users?
I want to make a choice of language in my bot. I found one question on the toaster, and following the example of the author, I made something like this dict:
"language": {
"eng": "language",
"rus": "язык"
},
await def get_text(q:{}, uid=None, lang=""):
if uid: #Если имеется id-телеграм юзера, тогда
# Ищем этого пользователя в бд
# Узнаем его язык
# Сохраняем в lang
pass
return q[lang]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question