Skip to content

Setting up multiple languages for the bot #1657

@popovvasile

Description

@popovvasile

I am trying to implement a chatbot with various languages. The language depends on the chatbot token that is being used (there are multiple).
I would like to set up a "lang" parameter in every context/update, in every handler. I didn't find a meaningful way to do this using persistence.


def start(update, context):
    update.message.reply_text( strings_dict[context["lang"]]["string_nr_1"], 
            reply_markup=markup)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions