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