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