langmanager

this library allows you to create translations of projects into other languages


Keywords
lang, langmanager, langs, translate, language, languages, localization
License
GPL-3.0
Install
pip install langmanager==1.4.2

Documentation

LangManager

Image alt GitHub repo size PyPI

this library allows you to create translations of projects into other languages

install:

Image alt

installing with pypi

-pip install langmanager

Image alt

installing with git

-git clone https://github.com/ASVIEST/LangManager.git

Simple example:

from langmanager import *

language = input('language:   ')
lang(language)
trans = translate_get('hello world')

print(lan())
print(trans)

language file(en):

'hello world':'hello world';

And language file(ru):

'hello world':'ΠΏΡ€ΠΈΠ²Π΅Ρ‚ ΠΌΠΈΡ€';
!language standard file name - lan(ISO 639-1).txt examples: en.txt, ru.txt, zh.txt
!But file name can change through function filepath_en , filepath_ru and others
language can be changed during working

improved example:

from langmanager import *

language = input('language:   ')
lang(language)
trans = translate_get('hello world')

print(lan())
print(trans)

lang('ru')
filepath_ru('en.txt')
trans = translate_get('hello i')
print(trans)
'hello world':'hello world';
'hello i':'hello i';

And language file(ru):

'hello world':'ΠΏΡ€ΠΈΠ²Π΅Ρ‚ ΠΌΠΈΡ€';
'hello i':'ΠΏΡ€ΠΈΠ²Π΅Ρ‚ я';