Metadata-Version: 2.4
Name: pylocals
Version: 1.0
Summary: Light localizing tool.
Project-URL: Homepage, https://github.com/evryoneowo/pylocals
Project-URL: Repository, https://github.com/evryoneowo/pylocals
Author-email: evryoneowo <evryhvh@email.com>
License: MIT
License-File: LICENSE
Requires-Python: >=3.10
Description-Content-Type: text/markdown

[![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.