An open API service indexing awesome lists of open source software.

https://github.com/tirch/langrinder

Flexible internationalization (i18n) engine based on Mako templates
https://github.com/tirch/langrinder

babel i18n internationalization python telegrinder telegrinder-tool

Last synced: about 1 year ago
JSON representation

Flexible internationalization (i18n) engine based on Mako templates

Awesome Lists containing this project

README

          


Langrinder


Flexible internationalization (i18n) engine based on Mako templates




Still in development
GitHub License
Code Style
Python versions

Project version


## Why Langrinder?
- Based on mako templates. Maximum flexibility and comfort
- Flexible compilers & parsers (default: JSON compiler)
- Variety of built-in functions and integrations

## Installation
```shell
pip install "langrinder @ git+https://github.com/tirch/langrinder.git"
pip install "langrinder[telegrinder] @ git+..."
pip install "langrinder[cli] @ git+..." # Recommended
```

## Usage
- Create locales files (`locales//.mako`)
- `locales/en/main.mako`:
```mako
@start: Hello from ${html.bold('Langrinder')}!
```
- `locales/ru/main.mako`:
```mako
@start: Привет от ${html.bold('Langrinder')}!
```
- Compile translations
```shell
langrinder locales/ locales/compiled.json
```
- Enjoy! See our [main example](./examples/main.py) and [bot example](./examples/bot.py)!

---

## License
Langrinder licensed under [MIT license](LICENSE). Free and open-source!