marko / translation
Translation interfaces and infrastructure for Marko Framework
Package info
github.com/marko-php/marko-translation
Type:marko-module
pkg:composer/marko/translation
0.0.1
2026-03-25 17:53 UTC
Requires
- php: ^8.5
- marko/config: 0.0.1
- marko/core: 0.0.1
Requires (Dev)
- marko/testing: 0.0.1
- pestphp/pest: ^4.0
This package is auto-updated.
Last update: 2026-03-25 21:07:28 UTC
README
Translation and i18n interface with placeholder replacement, pluralization, and fallback locale support.
Installation
composer require marko/translation
Note: You also need an implementation package such as marko/translation-file to load translations from disk.
Quick Example
use Marko\Translation\Contracts\TranslatorInterface; class WelcomeController { public function __construct( private readonly TranslatorInterface $translator, ) {} public function greet(): string { return $this->translator->get('messages.welcome'); } }
Documentation
Full usage, API reference, and examples: marko/translation