Musa 4547782a4a first commit 10 bulan lalu
..
Catalogue 4547782a4a first commit 10 bulan lalu
Command 4547782a4a first commit 10 bulan lalu
DataCollector 4547782a4a first commit 10 bulan lalu
DependencyInjection 4547782a4a first commit 10 bulan lalu
Dumper 4547782a4a first commit 10 bulan lalu
Exception 4547782a4a first commit 10 bulan lalu
Extractor 4547782a4a first commit 10 bulan lalu
Formatter 4547782a4a first commit 10 bulan lalu
Loader 4547782a4a first commit 10 bulan lalu
Provider 4547782a4a first commit 10 bulan lalu
Reader 4547782a4a first commit 10 bulan lalu
Resources 4547782a4a first commit 10 bulan lalu
Test 4547782a4a first commit 10 bulan lalu
Util 4547782a4a first commit 10 bulan lalu
Writer 4547782a4a first commit 10 bulan lalu
CHANGELOG.md 4547782a4a first commit 10 bulan lalu
CatalogueMetadataAwareInterface.php 4547782a4a first commit 10 bulan lalu
DataCollectorTranslator.php 4547782a4a first commit 10 bulan lalu
IdentityTranslator.php 4547782a4a first commit 10 bulan lalu
LICENSE 4547782a4a first commit 10 bulan lalu
LocaleSwitcher.php 4547782a4a first commit 10 bulan lalu
LoggingTranslator.php 4547782a4a first commit 10 bulan lalu
MessageCatalogue.php 4547782a4a first commit 10 bulan lalu
MessageCatalogueInterface.php 4547782a4a first commit 10 bulan lalu
MetadataAwareInterface.php 4547782a4a first commit 10 bulan lalu
PseudoLocalizationTranslator.php 4547782a4a first commit 10 bulan lalu
README.md 4547782a4a first commit 10 bulan lalu
TranslatableMessage.php 4547782a4a first commit 10 bulan lalu
Translator.php 4547782a4a first commit 10 bulan lalu
TranslatorBag.php 4547782a4a first commit 10 bulan lalu
TranslatorBagInterface.php 4547782a4a first commit 10 bulan lalu
composer.json 4547782a4a first commit 10 bulan lalu

README.md

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