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