wesmiler a41138daae wesmiler il y a 1 an
..
Catalogue a41138daae wesmiler il y a 1 an
Command a41138daae wesmiler il y a 1 an
DataCollector a41138daae wesmiler il y a 1 an
DependencyInjection a41138daae wesmiler il y a 1 an
Dumper a41138daae wesmiler il y a 1 an
Exception a41138daae wesmiler il y a 1 an
Extractor a41138daae wesmiler il y a 1 an
Formatter a41138daae wesmiler il y a 1 an
Loader a41138daae wesmiler il y a 1 an
Provider a41138daae wesmiler il y a 1 an
Reader a41138daae wesmiler il y a 1 an
Resources a41138daae wesmiler il y a 1 an
Test a41138daae wesmiler il y a 1 an
Util a41138daae wesmiler il y a 1 an
Writer a41138daae wesmiler il y a 1 an
CHANGELOG.md a41138daae wesmiler il y a 1 an
DataCollectorTranslator.php a41138daae wesmiler il y a 1 an
IdentityTranslator.php a41138daae wesmiler il y a 1 an
LICENSE a41138daae wesmiler il y a 1 an
LoggingTranslator.php a41138daae wesmiler il y a 1 an
MessageCatalogue.php a41138daae wesmiler il y a 1 an
MessageCatalogueInterface.php a41138daae wesmiler il y a 1 an
MetadataAwareInterface.php a41138daae wesmiler il y a 1 an
PseudoLocalizationTranslator.php a41138daae wesmiler il y a 1 an
README.md a41138daae wesmiler il y a 1 an
TranslatableMessage.php a41138daae wesmiler il y a 1 an
Translator.php a41138daae wesmiler il y a 1 an
TranslatorBag.php a41138daae wesmiler il y a 1 an
TranslatorBagInterface.php a41138daae wesmiler il y a 1 an
composer.json a41138daae wesmiler il y a 1 an

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