Kirin 80169d6661 first | 3 years ago | |
---|---|---|
.. | ||
Catalogue | 3 years ago | |
Command | 3 years ago | |
DataCollector | 3 years ago | |
DependencyInjection | 3 years ago | |
Dumper | 3 years ago | |
Exception | 3 years ago | |
Extractor | 3 years ago | |
Formatter | 3 years ago | |
Loader | 3 years ago | |
Reader | 3 years ago | |
Resources | 3 years ago | |
Util | 3 years ago | |
Writer | 3 years ago | |
.gitattributes | 3 years ago | |
CHANGELOG.md | 3 years ago | |
DataCollectorTranslator.php | 3 years ago | |
IdentityTranslator.php | 3 years ago | |
LICENSE | 3 years ago | |
LoggingTranslator.php | 3 years ago | |
MessageCatalogue.php | 3 years ago | |
MessageCatalogueInterface.php | 3 years ago | |
MetadataAwareInterface.php | 3 years ago | |
README.md | 3 years ago | |
Translator.php | 3 years ago | |
TranslatorBagInterface.php | 3 years ago | |
composer.json | 3 years ago |
The Translation component provides tools to internationalize your application.
$ composer require symfony/translation
use Symfony\Component\Translation\Translator;
$translator = new Translator('fr_FR');
$translator->addResource('array', [
'Hello World!' => 'Bonjour !',
], 'fr_FR');
echo $translator->trans('Hello World!'); // outputs « Bonjour ! »