urban 02fbfd43e2 codes commit 3 hete
..
Catalogue 02fbfd43e2 codes commit 3 hete
Command 02fbfd43e2 codes commit 3 hete
DataCollector 02fbfd43e2 codes commit 3 hete
DependencyInjection 02fbfd43e2 codes commit 3 hete
Dumper 02fbfd43e2 codes commit 3 hete
Exception 02fbfd43e2 codes commit 3 hete
Extractor 02fbfd43e2 codes commit 3 hete
Formatter 02fbfd43e2 codes commit 3 hete
Loader 02fbfd43e2 codes commit 3 hete
Provider 02fbfd43e2 codes commit 3 hete
Reader 02fbfd43e2 codes commit 3 hete
Resources 02fbfd43e2 codes commit 3 hete
Test 02fbfd43e2 codes commit 3 hete
Util 02fbfd43e2 codes commit 3 hete
Writer 02fbfd43e2 codes commit 3 hete
CHANGELOG.md 02fbfd43e2 codes commit 3 hete
DataCollectorTranslator.php 02fbfd43e2 codes commit 3 hete
IdentityTranslator.php 02fbfd43e2 codes commit 3 hete
LICENSE 02fbfd43e2 codes commit 3 hete
LoggingTranslator.php 02fbfd43e2 codes commit 3 hete
MessageCatalogue.php 02fbfd43e2 codes commit 3 hete
MessageCatalogueInterface.php 02fbfd43e2 codes commit 3 hete
MetadataAwareInterface.php 02fbfd43e2 codes commit 3 hete
PseudoLocalizationTranslator.php 02fbfd43e2 codes commit 3 hete
README.md 02fbfd43e2 codes commit 3 hete
TranslatableMessage.php 02fbfd43e2 codes commit 3 hete
Translator.php 02fbfd43e2 codes commit 3 hete
TranslatorBag.php 02fbfd43e2 codes commit 3 hete
TranslatorBagInterface.php 02fbfd43e2 codes commit 3 hete
composer.json 02fbfd43e2 codes commit 3 hete

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 5.4/6.0 is backed by:

  • Crowdin, a cloud-based localization management software helping teams to go global and stay agile.
  • Lokalise, a continuous localization and translation management platform that integrates into your development workflow so you can ship localized products, faster.

Help Symfony by sponsoring its development!

Resources