The Wayback Machine - https://web.archive.org/web/20201214222628/https://github.com/symfony/translation
Skip to content
5.x
Go to file
Code

Latest commit

* 5.1:
  Update .php_cs.dist
  Apply "visibility_required" CS rule to constants
a04209b

Git stats

Files

Permalink
Failed to load latest commit information.

README.md

Translation Component

The Translation component provides tools to internationalize your application.

Getting Started

$ composer require symfony/translation
use Symfony\Component\Translation\Translator;

$translator = new Translator('fr_FR');
$translator->addResource('array', [
    'Hello World!' => 'Bonjour !',
], 'fr_FR');

echo $translator->trans('Hello World!'); // outputs « Bonjour ! »

Resources

You can’t perform that action at this time.