unknown a0372a28bb second commit 2 сар өмнө
..
Catalogue a0372a28bb second commit 2 сар өмнө
Command a0372a28bb second commit 2 сар өмнө
DataCollector a0372a28bb second commit 2 сар өмнө
DependencyInjection a0372a28bb second commit 2 сар өмнө
Dumper a0372a28bb second commit 2 сар өмнө
Exception a0372a28bb second commit 2 сар өмнө
Extractor a0372a28bb second commit 2 сар өмнө
Formatter a0372a28bb second commit 2 сар өмнө
Loader a0372a28bb second commit 2 сар өмнө
Provider a0372a28bb second commit 2 сар өмнө
Reader a0372a28bb second commit 2 сар өмнө
Resources a0372a28bb second commit 2 сар өмнө
Test a0372a28bb second commit 2 сар өмнө
Util a0372a28bb second commit 2 сар өмнө
Writer a0372a28bb second commit 2 сар өмнө
CHANGELOG.md a0372a28bb second commit 2 сар өмнө
CatalogueMetadataAwareInterface.php a0372a28bb second commit 2 сар өмнө
DataCollectorTranslator.php a0372a28bb second commit 2 сар өмнө
IdentityTranslator.php a0372a28bb second commit 2 сар өмнө
LICENSE a0372a28bb second commit 2 сар өмнө
LocaleSwitcher.php a0372a28bb second commit 2 сар өмнө
LoggingTranslator.php a0372a28bb second commit 2 сар өмнө
MessageCatalogue.php a0372a28bb second commit 2 сар өмнө
MessageCatalogueInterface.php a0372a28bb second commit 2 сар өмнө
MetadataAwareInterface.php a0372a28bb second commit 2 сар өмнө
PseudoLocalizationTranslator.php a0372a28bb second commit 2 сар өмнө
README.md a0372a28bb second commit 2 сар өмнө
StaticMessage.php a0372a28bb second commit 2 сар өмнө
TranslatableMessage.php a0372a28bb second commit 2 сар өмнө
Translator.php a0372a28bb second commit 2 сар өмнө
TranslatorBag.php a0372a28bb second commit 2 сар өмнө
TranslatorBagInterface.php a0372a28bb second commit 2 сар өмнө
composer.json a0372a28bb second commit 2 сар өмнө

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

Help Symfony by sponsoring its development!

Resources