Answer the question
In order to leave comments, you need to log in
How to make telegram bot multilingual?
when starting the bot, the bot suggested choosing a language, after choosing a language, the interface changed to the selected language. how to do it?
Answer the question
In order to leave comments, you need to log in
1. Keep a table of languages like "User ID - Language ID". If there is no record for the user in the table, then you offer to choose, or you set some default value.
2. Store all persistent strings that the bot sends in some storage. The storage should look like "string ID - language ID - string content". Accordingly, when sending a message, you find out the language ID of the user with whom the exchange is taking place, and select the desired line by the line ID.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question