A language package manager
Project description
langSrc
Install
pip3 install langSrc
Demo
from langSrc import LanguageDetector
lang = LanguageDetector("zh", "lang.json")
lang.register(
"language",
{
"zh": "语言",
"en": "Language",
"jp": "言語",
"kor": "언어",
"fra": "Langue",
"spa": "Idioma",
"th": "ภาษา",
},
)
print(lang.language) # or print(lang["language"])
# 语言
This will generate a file named lang.json
:
{
"language": {
"zh": "语言",
"en": "Language",
"jp": "言語",
"kor": "언어",
"fra": "Langue",
"spa": "Idioma",
"th": "ภาษา"
}
}
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
langsrc-0.0.8.tar.gz
(2.5 kB
view hashes)