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