Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piotrmaslanka/internationalize
A library to help you with internationalizing your application
https://github.com/piotrmaslanka/internationalize
Last synced: 7 days ago
JSON representation
A library to help you with internationalizing your application
- Host: GitHub
- URL: https://github.com/piotrmaslanka/internationalize
- Owner: piotrmaslanka
- License: mit
- Created: 2023-04-18T17:31:08.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-04-18T21:39:48.000Z (over 1 year ago)
- Last Synced: 2024-08-09T15:19:21.263Z (3 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
internationalize
========
[![PyPI version](https://badge.fury.io/py/internationalize.svg)](https://badge.fury.io/py/internationalize)
[![PyPI](https://img.shields.io/pypi/pyversions/internationalize.svg)]()
[![PyPI](https://img.shields.io/pypi/implementation/internationalize.svg)]()
[![PyPI](https://img.shields.io/pypi/wheel/internationalize.svg)]()
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()A library to help you with internationalizing your application.
[Here's a guide to using it](https://github.com/piotrmaslanka/Internationalize/wiki/How-to-use-Internationalize)Intro
-----While most Python internationalize libraries take an approach
with your providing a language and a keyword, and returning
a resembling string from an internal database, Internationalize
takes a different approach.Internationalize asks you to provide a keyword, and then returning
a string containing a selection of the languages.Where you would configure the standard library with dictionary of mappings,
where each mapping would contain```
configure_me({'hello': {'pl': 'Witaj'}, {'en': 'Hello'}})
pick_language('en')
...
assert get_translation('hello') == 'Hello'
```Internationalize does the following:
```
configure_me({'hello': {'pl': 'Witaj'}, {'en': 'Hello'}})
...
assert get_translation('hello') == {'pl': 'Witaj', {'en': Hello'}}
```Which is super useful for handling certain applications that require those.