Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marko/translation

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

About

[READ-ONLY] Translation interfaces and infrastructure for Marko Framework. Issues and PRs at https://github.com/marko-php/marko

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages