germania-kg/translator

Callable translator

1.2.0 2023-01-04 15:25 UTC

This package is auto-updated.

Last update: 2024-11-04 19:28:00 UTC


README

Germania KG ยท Translator

Packagist PHP version Tests

Installation

$ composer require germania-kg/translator

Usage

<?php
use Laminas\I18n\Translator\Translator as LaminasTranslator;
use Germania\Translator\LaminasTranslatorCallable;

// Setup your Laminas
$laminas_translator = new LaminasTranslator;

$translator = new LaminasTranslatorCallable($laminas_translator);
echo $translator("MsgId");

// Optionally, add gettext et.al. domain
echo $translator("MsgId", "app");

Development

$ git clone git@github.com:GermaniaKG/Translator.git
$ cd Translator
$ composer install