Git Product home page Git Product logo

tgtranslator's Introduction

๐Ÿ“™ TgTranslator

TgTranslator is a telegram bot that translates messages in groups. Try it for yourself: @TgTranslatorBot

Use it in your project support group, to study language with a tutor, and in many other ways!

alt text

3๏ธโƒฃ Translation modes

This bot has 3 translation modes:

  1. Auto. This mode automatically translates all messages that do not match the language of the main group. In addition, the message should be less than the character limit (specified in appsettins.json -> TgTranslator -> CharLimit), should not be a command (for example: /help or .help for Userbots), and the group should not be in timeout.

  2. Forwards. Works like Auto, but translates only forwarded messages.

  3. Manual. Translates only after replying on message with !translate or bot username.

๐Ÿ“™ Languages

By default, bot has 105 languages supported by Google Translate.

alt text

โš™๏ธ Bot settings

In many group bots you can call menu in group chat. This one works different: the /settings command works only in private messages. It returns the main menu with Inline buttons which are the list of available settings.

alt text

When you select an option, it offers you to choose chat where you send ready command, like @TgTranslatorBot set:mode=auto.

alt text

This may seem a bit complicated, but it creates a lot more flexibility for larger groups. Users won't be interrupted by large message with buttons, and also, you can create prepared configurations for multiple groups.

Menu is higly customizable, so it's not hard to add new options, or even implement it in your own project.

โ–ถ๏ธ Setup

You need to have Docker and PostgreSQL.

  1. Clone repository and open directory:
    git clone https://github.com/Dubzer/TgTranslator.git && cd TgTranslator
  2. Configure the appsettings.json (it's pretty self-explanatory)
  3. Create a new class and implement ITranslator and ILanguageDetector interfaces. After that, open DiServices.cs and replace TranslatePlaceholderService with your new class.
  4. Build the project.
    docker build -t tgtranslator.
  5. Start an app container.
     docker run tgtranslator

๐Ÿ“ License

The project is licensed under the MIT license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.