Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-language support #2

Open
TuteOneDev opened this issue Sep 30, 2024 · 1 comment
Open

multi-language support #2

TuteOneDev opened this issue Sep 30, 2024 · 1 comment

Comments

@TuteOneDev
Copy link

(No code included)

How

Localization files (opt 1)

Add a directory to the project called ‘texts’ or ‘loc’ which contains .lang files each belonging to a language:
en_US.lang -> english
es_ES.lang -> español
etc

playing_song=Reproduciendo: {song}

Localization files (opt 2)

Add a directory to the project called ‘texts’ or ‘loc’ which contains .py files each belonging to a language:

translations = {
    'PLAYING_SONG': 'Reproduciendo: {song}',
    'LANGUAGE_CHANGED': 'Se ha cambiado el idioma a Español',
}

Keys/Value Parser

it would be necessary to create a parser that obtains each of the translation values and sends messages according to the chosen language

Command

/language <value>

or

/config language <value>

@MCbabel
Copy link
Owner

MCbabel commented Sep 30, 2024

Good idea! I'll add it to the next update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants