You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1748153932
04fb71596e
|
12 months ago | |
---|---|---|
.. | ||
Catalogue | 12 months ago | |
Command | 12 months ago | |
DataCollector | 12 months ago | |
DependencyInjection | 12 months ago | |
Dumper | 12 months ago | |
Exception | 12 months ago | |
Extractor | 12 months ago | |
Formatter | 12 months ago | |
Loader | 12 months ago | |
Reader | 12 months ago | |
Resources | 12 months ago | |
Util | 12 months ago | |
Writer | 12 months ago | |
.gitattributes | 12 months ago | |
CHANGELOG.md | 12 months ago | |
DataCollectorTranslator.php | 12 months ago | |
IdentityTranslator.php | 12 months ago | |
LICENSE | 12 months ago | |
LoggingTranslator.php | 12 months ago | |
MessageCatalogue.php | 12 months ago | |
MessageCatalogueInterface.php | 12 months ago | |
MetadataAwareInterface.php | 12 months ago | |
README.md | 12 months ago | |
Translator.php | 12 months ago | |
TranslatorBagInterface.php | 12 months ago | |
composer.json | 12 months ago |
README.md
Translation Component
The Translation component provides tools to internationalize your application.
Getting Started
$ 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 ! »