jeyroik/df-langs

There is no license information available for the latest version (0.1.0) of this package.

Languages package for DeFlou

0.1.0 2023-07-28 12:38 UTC

This package is auto-updated.

Last update: 2024-10-28 15:18:11 UTC


README

tests codecov.io Latest Stable Version Total Downloads Dependents

df-langs

Langs support for DeFlou

usage

extas.php

{
    "languages": [
        {
            "name": "russian",
            "title": "Русский",
            "params": {
                "code": {
                    "name": "code",
                    "value": "ru"
                }
            }
        }
    ],

    "phrases": [
        {
            "name": "test",
            "lang": "russian",
            "value": "тест"
        }
    ]
}

Install languages and phrases: $ extas i

Phrase translate

echo ELangs::Russian->translate('test'); // результат: тест

Also you can translate object fields and parameters title/description. See tests for details.