yangkangwei cbf378a57b first 2 年 前
..
Catalogue cbf378a57b first 2 年 前
Command cbf378a57b first 2 年 前
DataCollector cbf378a57b first 2 年 前
DependencyInjection cbf378a57b first 2 年 前
Dumper cbf378a57b first 2 年 前
Exception cbf378a57b first 2 年 前
Extractor cbf378a57b first 2 年 前
Formatter cbf378a57b first 2 年 前
Loader cbf378a57b first 2 年 前
Reader cbf378a57b first 2 年 前
Resources cbf378a57b first 2 年 前
Util cbf378a57b first 2 年 前
Writer cbf378a57b first 2 年 前
CHANGELOG.md cbf378a57b first 2 年 前
DataCollectorTranslator.php cbf378a57b first 2 年 前
IdentityTranslator.php cbf378a57b first 2 年 前
Interval.php cbf378a57b first 2 年 前
LICENSE cbf378a57b first 2 年 前
LoggingTranslator.php cbf378a57b first 2 年 前
MessageCatalogue.php cbf378a57b first 2 年 前
MessageCatalogueInterface.php cbf378a57b first 2 年 前
MessageSelector.php cbf378a57b first 2 年 前
MetadataAwareInterface.php cbf378a57b first 2 年 前
PluralizationRules.php cbf378a57b first 2 年 前
README.md cbf378a57b first 2 年 前
Translator.php cbf378a57b first 2 年 前
TranslatorBagInterface.php cbf378a57b first 2 年 前
TranslatorInterface.php cbf378a57b first 2 年 前

README.md

Translation Component

The Translation component provides tools to internationalize your application.

Getting Started

$ 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 ! »

Resources