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