unknown abd0e89a86 second commit 2 months ago
..
Catalogue abd0e89a86 second commit 2 months ago
Command abd0e89a86 second commit 2 months ago
DataCollector abd0e89a86 second commit 2 months ago
DependencyInjection abd0e89a86 second commit 2 months ago
Dumper abd0e89a86 second commit 2 months ago
Exception abd0e89a86 second commit 2 months ago
Extractor abd0e89a86 second commit 2 months ago
Formatter abd0e89a86 second commit 2 months ago
Loader abd0e89a86 second commit 2 months ago
Provider abd0e89a86 second commit 2 months ago
Reader abd0e89a86 second commit 2 months ago
Resources abd0e89a86 second commit 2 months ago
Test abd0e89a86 second commit 2 months ago
Util abd0e89a86 second commit 2 months ago
Writer abd0e89a86 second commit 2 months ago
CHANGELOG.md abd0e89a86 second commit 2 months ago
CatalogueMetadataAwareInterface.php abd0e89a86 second commit 2 months ago
DataCollectorTranslator.php abd0e89a86 second commit 2 months ago
IdentityTranslator.php abd0e89a86 second commit 2 months ago
LICENSE abd0e89a86 second commit 2 months ago
LocaleSwitcher.php abd0e89a86 second commit 2 months ago
LoggingTranslator.php abd0e89a86 second commit 2 months ago
MessageCatalogue.php abd0e89a86 second commit 2 months ago
MessageCatalogueInterface.php abd0e89a86 second commit 2 months ago
MetadataAwareInterface.php abd0e89a86 second commit 2 months ago
PseudoLocalizationTranslator.php abd0e89a86 second commit 2 months ago
README.md abd0e89a86 second commit 2 months ago
StaticMessage.php abd0e89a86 second commit 2 months ago
TranslatableMessage.php abd0e89a86 second commit 2 months ago
Translator.php abd0e89a86 second commit 2 months ago
TranslatorBag.php abd0e89a86 second commit 2 months ago
TranslatorBagInterface.php abd0e89a86 second commit 2 months ago
composer.json abd0e89a86 second commit 2 months 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