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 .json according to the template /locales/en-US/.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(text=_("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(text=(_("hello2")).format(name="Nikita"))

async def hi2(ctx: Interaction) -> PartialInteractionMessage:
    _ = evg.MSG(ctx.locale).msg
    return await ctx.send(text=(_("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

For support, VK; DISCORD.

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.6.tar.gz (2.8 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.6-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: evg-2.5.6.tar.gz
  • Upload date:
  • Size: 2.8 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.6.tar.gz
Algorithm Hash digest
SHA256 85165205e565d159c0769bf394e7cc82f7ed240eb397d2eb3bd45f24e71e080c
MD5 539da4e4751cfe50cc5f5f09419cdf5c
BLAKE2b-256 cda4526ad4f15f66900a196b976de151b51fd7522e8f752e7a7375fa1142affc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: evg-2.5.6-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 393f92052927daa03301fdf86845ea8f024a68ea12b1d5788974cbac573b8971
MD5 f7356502504bad478b567292030d4188
BLAKE2b-256 ea45dbbc6ca63fedba1ae6a374aba6bea0ce57046e3aaee3b4aeabf58730eb20

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