[![PyPI Package](https://img.shields.io/badge/package-pylocals-blue)](https://pypi.org/project/pylocals/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# pylocals
Light localization tool.

## Installation
```bash
pip install pylocals
```

## How to use
Create locals file, e.g. `locals.json`. It should contain localizations like this:
```json
{
    "default": "en",
    "en": {
        "hello": "Hello"
    },
    "ru": {
        "hello": "Привет"
    }
}
```
Then, write in python:
```python
from pylocals import load

local = load('local.json')

lang = local['ru']
print(lang.hello)
# Привет
```

## Features
Several localizations support.    
`locals.json`:
```json
{
    "en": {
        "hello": ["Hi", "Hello"],
        "bye": "Bye bye"
    }
}
```
And if we write in python:
```python
lang.hello
```
Then it will return a random one.