This is a simple module which is used for internationalization(i18n).
You just need place localization files in a directory, like this:
- lang
- - en_us.json
- - zh_cn.json
import langful
lang = langful( "lang" )
print( lang )
The default language code is obtained using the locale
module and follows the RFC 1766 standard.
langful
supports three default localization file types, and you can easily add custom loaders.
pip install langful