Skip to main content

Discord translator & translation of Discord functions/interactions

Project description

Features

  • Dicord interactions translator
  • Optimization
  • Easy to use

Installation

  • Install evg with pip
  pip install evg
  • Set up a new folder /locales
  • Add language packs with the file extension ".json" according to the template /locales/en-US/example.json

Examples

File - locales/en-US/example.json

{
    "hello1": "Hello world!",
    "hello2": "Hello {name}!",
    "hello3": "Hello {0}!"
}

Base

import evg
_ = evg.MSG("en-US").msg
print(_("hello1"))
  • Output text: Hello world!

OR

import evg
from nextcord import Interaction, PartialInteractionMessage
async def hi(ctx: Interaction) -> PartialInteractionMessage:
    _ = evg.MSG(ctx.locale).msg
    return await ctx.send(content=_("hello1"))
  • Output text: Hello world!

OR

import evg
from nextcord import Interaction, PartialInteractionMessage

async def hi(ctx: Interaction) -> PartialInteractionMessage:
    _ = evg.MSG(ctx.locale).msg
    return await ctx.send(content=(_("hello2", name="Nikita")))

async def hi2(ctx: Interaction) -> PartialInteractionMessage:
    _ = evg.MSG(ctx.locale).msg
    return await ctx.send(content=(_("hello3", "Bob")))

Output text:

  • Hello Nikita!
  • Hello Bob!

Change settings

Default language

import evg
evg.Setup.language("en-US")

Default text if no translation was found

import evg
evg.Setup.text("рџ’•")

Support

Discord Gmail

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evg-2.7.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evg-2.7.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file evg-2.7.1.tar.gz.

File metadata

  • Download URL: evg-2.7.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for evg-2.7.1.tar.gz
Algorithm Hash digest
SHA256 4a14abb4b29193215243cdc9d7b7563993dd01744511b24af4288447cc1b0e6c
MD5 18b95b69be871abd880dd0774d530db5
BLAKE2b-256 93a1e75f60feba6bc8d3d80a5be58e0f5930f8bfa021e4712a907019aac3d6e2

See more details on using hashes here.

File details

Details for the file evg-2.7.1-py3-none-any.whl.

File metadata

  • Download URL: evg-2.7.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for evg-2.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41222273faacc28614e03ab4679a25149f0bf42a2296a19876964a3d8ed3d55b
MD5 003d7af3ca915cd48ab283a54a52c342
BLAKE2b-256 8add12c4f2f90ee1f0368172b0e83f47303594e87a050e8ce812e84377b3f476

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page