orisai/translation-contracts

Interface for translator and translatable messages

1.1.1 2024-06-21 08:45 UTC

This package is auto-updated.

Last update: 2024-10-21 09:42:18 UTC


README

Orisai
Translation Contracts

Interface for translator and translatable messages

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

use Orisai\TranslationContracts\Translator;
assert($translator instanceof Translator);
$translator->translate('message.id', ['parameter' => 'value']);  // string (translated message)

// Or

use function Orisai\TranslationContracts\t;
t('message.id', ['parameter' => 'value']); // string (translated message)