Skip to main content

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)

Uploaded Source

Built Distribution

langsrc-0.0.8-py3-none-any.whl (2.5 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