Skip to content

symfony/translation

6.1
Switch branches/tags
Code

Latest commit

* 6.0: (23 commits)
  cs fix
  [Messenger] Fix Doctrine transport on MySQL
  [Filesystem] Remove needless `mb_*` calls
  [Translator] Fix translator overlapse
  [Yaml] Improve test coverage in DumperTest and ParserTest
  Extract dispatching console signal handling and include subscribers
  [Mailer] Fix error message in case of an STMP error
  [HttpClient] Fix shared connections not being freed on PHP < 8
  [HttpFoundation] Fix invalid ID not regenerated with native PHP file sessions
  [HttpClient] Fix memory leak when using StreamWrapper
  minor: fix test
  [Serializer] Fix error message
  remove the ChatterInterface alias when the chatter service is removed
  Bump Symfony version to 6.0.12
  Update VERSION for 6.0.11
  Update CHANGELOG for 6.0.11
  Bump Symfony version to 5.4.12
  Update VERSION for 5.4.11
  Update CHANGELOG for 5.4.11
  Bump Symfony version to 4.4.45
  ...
45d0f5b

Git stats

Files

Permalink
Failed to load latest commit information.

Translation Component

The Translation component provides tools to internationalize your application.

Getting Started

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

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

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

Sponsor

The Translation component for Symfony 6.1 is backed by:

  • Crowdin, a cloud-based localization management software helping teams to go global and stay agile.

Help Symfony by sponsoring its development!

Resources