Skip to content

ASVIEST/LangManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Create localisations for other languages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages