DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 964,423 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
ILshat Khamitov
ILshat Khamitov

Posted on

Add multi-language support for telegram bot on NestJS

A lot of changes, I didn’t copy and paste the whole process, I’ll just give a link to the commit, everything is there.

Links

https://github.com/EndyKaufman/kaufman-bot/commit/641320a74c27e74e46d7da31fbf64348a8978384 - commit with current changes

https://telegram.me/DevelopKaufmanBot - current bot in telegram

Significant changes:

  1. Added a new lib for switching languages ​​LanguageSwitherModule
  2. Updated old libs and added support for multiple languages
  3. Moved general things about processing commands into a separate module

Significant changes

Screenshots with new logic

Screenshots with new logic

In the next post there will be instructions on how to add new dictionaries with translations...

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Just kidding, it's a personal preference. But you can change your theme, font, etc. in your settings.

The more you know. 🌈