刘远航 94eefae904 vendor 4 years ago
..
Catalogue 94eefae904 vendor 4 years ago
Command 94eefae904 vendor 4 years ago
DataCollector 94eefae904 vendor 4 years ago
DependencyInjection 94eefae904 vendor 4 years ago
Dumper 94eefae904 vendor 4 years ago
Exception 94eefae904 vendor 4 years ago
Extractor 94eefae904 vendor 4 years ago
Formatter 94eefae904 vendor 4 years ago
Loader 94eefae904 vendor 4 years ago
Reader 94eefae904 vendor 4 years ago
Resources 94eefae904 vendor 4 years ago
Util 94eefae904 vendor 4 years ago
Writer 94eefae904 vendor 4 years ago
CHANGELOG.md 94eefae904 vendor 4 years ago
DataCollectorTranslator.php 94eefae904 vendor 4 years ago
IdentityTranslator.php 94eefae904 vendor 4 years ago
Interval.php 94eefae904 vendor 4 years ago
LICENSE 94eefae904 vendor 4 years ago
LoggingTranslator.php 94eefae904 vendor 4 years ago
MessageCatalogue.php 94eefae904 vendor 4 years ago
MessageCatalogueInterface.php 94eefae904 vendor 4 years ago
MessageSelector.php 94eefae904 vendor 4 years ago
MetadataAwareInterface.php 94eefae904 vendor 4 years ago
PluralizationRules.php 94eefae904 vendor 4 years ago
README.md 94eefae904 vendor 4 years ago
Translator.php 94eefae904 vendor 4 years ago
TranslatorBagInterface.php 94eefae904 vendor 4 years ago
TranslatorInterface.php 94eefae904 vendor 4 years ago
composer.json 94eefae904 vendor 4 years 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 ! »

Resources