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

Using 18n in scheduled messages #53

Open
cakeinpanic opened this issue Oct 23, 2024 · 1 comment
Open

Using 18n in scheduled messages #53

cakeinpanic opened this issue Oct 23, 2024 · 1 comment
Labels
question Further information is requested

Comments

@cakeinpanic
Copy link

Hi!
I want to send users scheduled messages once a day, so I'm adding a setTimeout and use bot.api.sendMessage(userId, but in that case I have no possibility to use context and hence i18n...

How can this be solved?

@KnorpelSenf
Copy link
Member

You can translate strings directly using the i18n instance. You'll just have to pass the locale for that. No context needed.

@KnorpelSenf KnorpelSenf added the question Further information is requested label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants