devn00b c2c6bf7610 Initial Upload of Bot | il y a 1 an | |
---|---|---|
.. | ||
Catalogue | il y a 1 an | |
Command | il y a 1 an | |
DataCollector | il y a 1 an | |
DependencyInjection | il y a 1 an | |
Dumper | il y a 1 an | |
Exception | il y a 1 an | |
Extractor | il y a 1 an | |
Formatter | il y a 1 an | |
Loader | il y a 1 an | |
Provider | il y a 1 an | |
Reader | il y a 1 an | |
Resources | il y a 1 an | |
Test | il y a 1 an | |
Util | il y a 1 an | |
Writer | il y a 1 an | |
CHANGELOG.md | il y a 1 an | |
DataCollectorTranslator.php | il y a 1 an | |
IdentityTranslator.php | il y a 1 an | |
LICENSE | il y a 1 an | |
LoggingTranslator.php | il y a 1 an | |
MessageCatalogue.php | il y a 1 an | |
MessageCatalogueInterface.php | il y a 1 an | |
MetadataAwareInterface.php | il y a 1 an | |
PseudoLocalizationTranslator.php | il y a 1 an | |
README.md | il y a 1 an | |
TranslatableMessage.php | il y a 1 an | |
Translator.php | il y a 1 an | |
TranslatorBag.php | il y a 1 an | |
TranslatorBagInterface.php | il y a 1 an | |
composer.json | il y a 1 an |
The Translation component provides tools to internationalize your application.
$ 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 ! »
The Translation component for Symfony 5.4/6.0 is backed by:
Help Symfony by sponsoring its development!