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")).format(name="Nikita"))

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

Output text:

  • Hello Nikita!
  • Hello Bob!

Change settings

Default language

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

Default text if no translation was found

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.5.8.tar.gz (2.9 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.5.8-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: evg-2.5.8.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for evg-2.5.8.tar.gz
Algorithm Hash digest
SHA256 d81dac4f33f89c857f35d49fb6c1385784cf9ced971523e7efe6707cd520c8ac
MD5 917f5dab17d20c59b30d2dc650bdee87
BLAKE2b-256 431940d801cb051d6ffb963d78f24c99bd1c71b411f5ae29e0f25dd6b6167bec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: evg-2.5.8-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for evg-2.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c124d614e5b88c908eb597ecdf60525e734d3d74a0a6111432ae9c33cfdda723
MD5 4108f35da3efc651462dd7795c85b1f2
BLAKE2b-256 4aaf0a292fa6ab62eaa6c8a8ec27b050bf45be24046fd031a4ee3ce7a8608397

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