Skip to main content

No project description provided

Project description

langful

PyPI version Python version license Github stars Github issues

install

pip3 install langful or pip install langful

vscode-langful

GitHub

VSCode

get start

lang file

ps: langful load json file first

.json

{
    "key": "value" ,
    "..." : "..."
}

.lang

key = value # hi, this is a example
# hi, I am a example, too
... = ...

init

there have two ways to init

by files

import langful
lang = langful.lang()

by dictionary

import langful
lang = langful.lang( False )
lang.init_dict( {
    "en_us" : {
        "hi" : "Hi" ,
        "welcome" : "Welcome"
    } ,
    "zh_cn" : {
        "hi" : "你好" ,
        "welcome" : "欢迎"
    }
} )

replace

have bug

replace str

import langful
lang = langful.lang( False )
lang.init_dict( {
    "en_us" : {
        "hi" : "Hi" ,
        "welcome" : "Welcome"
    } ,
    "zh_cn" : {
        "hi" : "你好" ,
        "welcome" : "欢迎"
    }
} )
print(lang.replace_str( "%hi%, %welcome%!" ))

About

github: https://github.com/cueavyqwp/langful

pypi: https://pypi.org/project/langful

issues: https://github.com/cueavyqwp/langful/issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

langful-0.29-py2.py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 2 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