刘远航 94eefae904 vendor há 4 anos atrás
..
Catalogue 94eefae904 vendor há 4 anos atrás
Command 94eefae904 vendor há 4 anos atrás
DataCollector 94eefae904 vendor há 4 anos atrás
DependencyInjection 94eefae904 vendor há 4 anos atrás
Dumper 94eefae904 vendor há 4 anos atrás
Exception 94eefae904 vendor há 4 anos atrás
Extractor 94eefae904 vendor há 4 anos atrás
Formatter 94eefae904 vendor há 4 anos atrás
Loader 94eefae904 vendor há 4 anos atrás
Reader 94eefae904 vendor há 4 anos atrás
Resources 94eefae904 vendor há 4 anos atrás
Util 94eefae904 vendor há 4 anos atrás
Writer 94eefae904 vendor há 4 anos atrás
CHANGELOG.md 94eefae904 vendor há 4 anos atrás
DataCollectorTranslator.php 94eefae904 vendor há 4 anos atrás
IdentityTranslator.php 94eefae904 vendor há 4 anos atrás
Interval.php 94eefae904 vendor há 4 anos atrás
LICENSE 94eefae904 vendor há 4 anos atrás
LoggingTranslator.php 94eefae904 vendor há 4 anos atrás
MessageCatalogue.php 94eefae904 vendor há 4 anos atrás
MessageCatalogueInterface.php 94eefae904 vendor há 4 anos atrás
MessageSelector.php 94eefae904 vendor há 4 anos atrás
MetadataAwareInterface.php 94eefae904 vendor há 4 anos atrás
PluralizationRules.php 94eefae904 vendor há 4 anos atrás
README.md 94eefae904 vendor há 4 anos atrás
Translator.php 94eefae904 vendor há 4 anos atrás
TranslatorBagInterface.php 94eefae904 vendor há 4 anos atrás
TranslatorInterface.php 94eefae904 vendor há 4 anos atrás
composer.json 94eefae904 vendor há 4 anos atrás

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