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