Kirin 93a3391a21 init | il y a 11 mois | |
---|---|---|
.. | ||
Catalogue | il y a 11 mois | |
Command | il y a 11 mois | |
DataCollector | il y a 11 mois | |
DependencyInjection | il y a 11 mois | |
Dumper | il y a 11 mois | |
Exception | il y a 11 mois | |
Extractor | il y a 11 mois | |
Formatter | il y a 11 mois | |
Loader | il y a 11 mois | |
Provider | il y a 11 mois | |
Reader | il y a 11 mois | |
Resources | il y a 11 mois | |
Test | il y a 11 mois | |
Util | il y a 11 mois | |
Writer | il y a 11 mois | |
CHANGELOG.md | il y a 11 mois | |
DataCollectorTranslator.php | il y a 11 mois | |
IdentityTranslator.php | il y a 11 mois | |
LICENSE | il y a 11 mois | |
LoggingTranslator.php | il y a 11 mois | |
MessageCatalogue.php | il y a 11 mois | |
MessageCatalogueInterface.php | il y a 11 mois | |
MetadataAwareInterface.php | il y a 11 mois | |
PseudoLocalizationTranslator.php | il y a 11 mois | |
README.md | il y a 11 mois | |
TranslatableMessage.php | il y a 11 mois | |
Translator.php | il y a 11 mois | |
TranslatorBag.php | il y a 11 mois | |
TranslatorBagInterface.php | il y a 11 mois | |
composer.json | il y a 11 mois |
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!