Skip to content

symfony/translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e7fd8e2 · Apr 7, 2025
Sep 25, 2024
Jun 20, 2024
Jul 4, 2024
May 29, 2024
Jun 20, 2024
Feb 13, 2025
Jun 20, 2024
Sep 28, 2024
Jun 20, 2024
Sep 18, 2024
Jun 20, 2024
Jul 5, 2023
Apr 7, 2025
Sep 23, 2024
Feb 13, 2025
Jun 20, 2024
Jun 20, 2024
Jul 6, 2024
Jul 21, 2013
Nov 12, 2024
Jul 5, 2023
Aug 5, 2024
Jun 7, 2019
Jan 24, 2023
Apr 3, 2024
Aug 5, 2024
Jun 20, 2024
Jan 23, 2024
Jul 5, 2023
Dec 7, 2024
May 2, 2024
May 29, 2024
Jun 20, 2024
Jan 23, 2024
Jan 23, 2024
Aug 19, 2024
Jun 2, 2021

Repository files navigation

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 7.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