ss 33d2a96cf2 初始化 | 5 mesiacov pred | |
---|---|---|
.. | ||
Catalogue | 5 mesiacov pred | |
Command | 5 mesiacov pred | |
DataCollector | 5 mesiacov pred | |
DependencyInjection | 5 mesiacov pred | |
Dumper | 5 mesiacov pred | |
Exception | 5 mesiacov pred | |
Extractor | 5 mesiacov pred | |
Formatter | 5 mesiacov pred | |
Loader | 5 mesiacov pred | |
Reader | 5 mesiacov pred | |
Resources | 5 mesiacov pred | |
Util | 5 mesiacov pred | |
Writer | 5 mesiacov pred | |
CHANGELOG.md | 5 mesiacov pred | |
DataCollectorTranslator.php | 5 mesiacov pred | |
IdentityTranslator.php | 5 mesiacov pred | |
Interval.php | 5 mesiacov pred | |
LICENSE | 5 mesiacov pred | |
LoggingTranslator.php | 5 mesiacov pred | |
MessageCatalogue.php | 5 mesiacov pred | |
MessageCatalogueInterface.php | 5 mesiacov pred | |
MessageSelector.php | 5 mesiacov pred | |
MetadataAwareInterface.php | 5 mesiacov pred | |
PluralizationRules.php | 5 mesiacov pred | |
README.md | 5 mesiacov pred | |
Translator.php | 5 mesiacov pred | |
TranslatorBagInterface.php | 5 mesiacov pred | |
TranslatorInterface.php | 5 mesiacov pred | |
composer.json | 5 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 ! »