unknown abd0e89a86 second commit 1 month ago
..
Catalogue abd0e89a86 second commit 1 month ago
Command abd0e89a86 second commit 1 month ago
DataCollector abd0e89a86 second commit 1 month ago
DependencyInjection abd0e89a86 second commit 1 month ago
Dumper abd0e89a86 second commit 1 month ago
Exception abd0e89a86 second commit 1 month ago
Extractor abd0e89a86 second commit 1 month ago
Formatter abd0e89a86 second commit 1 month ago
Loader abd0e89a86 second commit 1 month ago
Provider abd0e89a86 second commit 1 month ago
Reader abd0e89a86 second commit 1 month ago
Resources abd0e89a86 second commit 1 month ago
Test abd0e89a86 second commit 1 month ago
Util abd0e89a86 second commit 1 month ago
Writer abd0e89a86 second commit 1 month ago
CHANGELOG.md abd0e89a86 second commit 1 month ago
CatalogueMetadataAwareInterface.php abd0e89a86 second commit 1 month ago
DataCollectorTranslator.php abd0e89a86 second commit 1 month ago
IdentityTranslator.php abd0e89a86 second commit 1 month ago
LICENSE abd0e89a86 second commit 1 month ago
LocaleSwitcher.php abd0e89a86 second commit 1 month ago
LoggingTranslator.php abd0e89a86 second commit 1 month ago
MessageCatalogue.php abd0e89a86 second commit 1 month ago
MessageCatalogueInterface.php abd0e89a86 second commit 1 month ago
MetadataAwareInterface.php abd0e89a86 second commit 1 month ago
PseudoLocalizationTranslator.php abd0e89a86 second commit 1 month ago
README.md abd0e89a86 second commit 1 month ago
StaticMessage.php abd0e89a86 second commit 1 month ago
TranslatableMessage.php abd0e89a86 second commit 1 month ago
Translator.php abd0e89a86 second commit 1 month ago
TranslatorBag.php abd0e89a86 second commit 1 month ago
TranslatorBagInterface.php abd0e89a86 second commit 1 month ago
composer.json abd0e89a86 second commit 1 month ago

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