Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use it in groups? #34

Open
mxvsh opened this issue Apr 14, 2020 · 1 comment
Open

How can I use it in groups? #34

mxvsh opened this issue Apr 14, 2020 · 1 comment

Comments

@mxvsh
Copy link

mxvsh commented Apr 14, 2020

I see that it only change the language for user, and not for chats. How can I make is use chat_id only?

@EdJoPaTo
Copy link
Contributor

EdJoPaTo commented Oct 7, 2020

The language used is loaded from session.__language_code. If its not available from the from.language_code which is the user. If that does not exist its the config.defaultLanguage.

Typically I would say this is fitting as the user is the one a message is target for. Normally a group has a different session than a user. Make sure you use the session and set the language via ctx.i18n.locale('en or whatever you want') and the group session has the language to use set.

Hope that helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants