Zory a30513060a frist il y a 4 semaines
..
Catalogue a30513060a frist il y a 4 semaines
Command a30513060a frist il y a 4 semaines
DataCollector a30513060a frist il y a 4 semaines
DependencyInjection a30513060a frist il y a 4 semaines
Dumper a30513060a frist il y a 4 semaines
Exception a30513060a frist il y a 4 semaines
Extractor a30513060a frist il y a 4 semaines
Formatter a30513060a frist il y a 4 semaines
Loader a30513060a frist il y a 4 semaines
Provider a30513060a frist il y a 4 semaines
Reader a30513060a frist il y a 4 semaines
Resources a30513060a frist il y a 4 semaines
Test a30513060a frist il y a 4 semaines
Util a30513060a frist il y a 4 semaines
Writer a30513060a frist il y a 4 semaines
CHANGELOG.md a30513060a frist il y a 4 semaines
CatalogueMetadataAwareInterface.php a30513060a frist il y a 4 semaines
DataCollectorTranslator.php a30513060a frist il y a 4 semaines
IdentityTranslator.php a30513060a frist il y a 4 semaines
LICENSE a30513060a frist il y a 4 semaines
LocaleSwitcher.php a30513060a frist il y a 4 semaines
LoggingTranslator.php a30513060a frist il y a 4 semaines
MessageCatalogue.php a30513060a frist il y a 4 semaines
MessageCatalogueInterface.php a30513060a frist il y a 4 semaines
MetadataAwareInterface.php a30513060a frist il y a 4 semaines
PseudoLocalizationTranslator.php a30513060a frist il y a 4 semaines
README.md a30513060a frist il y a 4 semaines
TranslatableMessage.php a30513060a frist il y a 4 semaines
Translator.php a30513060a frist il y a 4 semaines
TranslatorBag.php a30513060a frist il y a 4 semaines
TranslatorBagInterface.php a30513060a frist il y a 4 semaines
composer.json a30513060a frist il y a 4 semaines

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