Skip to main content

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

Project description

LangManager

Image alt GitHub repo size PyPI

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

install:

pypi_icon

installing with pypi

pip install langmanager
git_icon

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':'привет я';

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

langmanager-1.4.2.tar.gz (15.4 kB view hashes)

Uploaded Source

Built Distribution

langmanager-1.4.2-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

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