No project description provided
Project description
install
pip3 install langful
or pip install langful
vscode-langful
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
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for langful-0.29-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af9fb67258dc4652024885452ece41a8fdd56356005a7737e954cdf8bb3779fa |
|
MD5 | 506264de6a322d03ee911603b0be6227 |
|
BLAKE2b-256 | 23ff2004a3fdcc9c84e4d7e3c83fda6147b6624eaf43e2b9bf5b1111be699476 |