Language

You can modify the default language files and even create your own language files.

Note

The following languages are available by default:

  • English (en)

  • German (de)

Modify language files

  1. Create a JSON file with the prefix ez_ somewhere in your project.

    • If you want to modify the English language file: ez_en.json.

    • If you want to create a new language file: ez_[language].json.

    If you want to create a French language file, the file name could be ez_fr.json.

  2. Search the language files and find keys you want to override.

    • Include any keys that you want to override in your JSON file.

  3. Pass the language string into Bot() to set your language.

bot = ezcord.Bot(language="fr")  # French (loaded from ez_fr.json)

If your bot supports multiple languages, set language to auto to automatically detect the language. You can set a fallback language with default_language.

The fallback language is used when no language file is found for the detected language.

bot = ezcord.Bot(language="auto", default_language="en")

Language files