y 6d580e2b69 hooray_1 3 년 전
..
Catalogue 6d580e2b69 hooray_1 3 년 전
Command 6d580e2b69 hooray_1 3 년 전
DataCollector 6d580e2b69 hooray_1 3 년 전
DependencyInjection 6d580e2b69 hooray_1 3 년 전
Dumper 6d580e2b69 hooray_1 3 년 전
Exception 6d580e2b69 hooray_1 3 년 전
Extractor 6d580e2b69 hooray_1 3 년 전
Formatter 6d580e2b69 hooray_1 3 년 전
Loader 6d580e2b69 hooray_1 3 년 전
Reader 6d580e2b69 hooray_1 3 년 전
Resources 6d580e2b69 hooray_1 3 년 전
Util 6d580e2b69 hooray_1 3 년 전
Writer 6d580e2b69 hooray_1 3 년 전
CHANGELOG.md 6d580e2b69 hooray_1 3 년 전
DataCollectorTranslator.php 6d580e2b69 hooray_1 3 년 전
IdentityTranslator.php 6d580e2b69 hooray_1 3 년 전
LICENSE 6d580e2b69 hooray_1 3 년 전
LoggingTranslator.php 6d580e2b69 hooray_1 3 년 전
MessageCatalogue.php 6d580e2b69 hooray_1 3 년 전
MessageCatalogueInterface.php 6d580e2b69 hooray_1 3 년 전
MetadataAwareInterface.php 6d580e2b69 hooray_1 3 년 전
PseudoLocalizationTranslator.php 6d580e2b69 hooray_1 3 년 전
README.md 6d580e2b69 hooray_1 3 년 전
TranslatableMessage.php 6d580e2b69 hooray_1 3 년 전
Translator.php 6d580e2b69 hooray_1 3 년 전
TranslatorBagInterface.php 6d580e2b69 hooray_1 3 년 전
composer.json 6d580e2b69 hooray_1 3 년 전

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