Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

internationalization-py

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

internationalization-py

Internationalization library for comfortable usage

  • 0.1.4
  • PyPI
  • Socket score

Maintainers
1

Internationalization.py

Provides simple and powerful i18n realization

Installation

With pip
pip install internationalization.py
Via Git
git clone https://github.com/cortelf/internationalization.py
cd internationalization.py
python setup.py install

Usage

Create directory for yaml files
mkdir yourdirectory
Write your yaml files

You can use .yml or .yaml file extensions

en.yml
hello_world: Hello World!
it.yml
hello_world: Ciao mondo!
In root of your app initialize singleton
from internationalization import Internationalization
from internationalization.loaders import YAMLLoader

i18n = Internationalization()
i18n.initialize(YAMLLoader("yourdirectory"))
It's ready to use in any place
from internationalization import Internationalization

i18n = Internationalization()
english = i18n.get_language("en")
italian = i18n.get_language("it")

print("English:", english.hello_world)
print("Italian:", italian.hello_world)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc