wangsaitao b6131e421c 提交 1 gadu atpakaļ
..
Catalogue b6131e421c 提交 1 gadu atpakaļ
Command b6131e421c 提交 1 gadu atpakaļ
DataCollector b6131e421c 提交 1 gadu atpakaļ
DependencyInjection b6131e421c 提交 1 gadu atpakaļ
Dumper b6131e421c 提交 1 gadu atpakaļ
Exception b6131e421c 提交 1 gadu atpakaļ
Extractor b6131e421c 提交 1 gadu atpakaļ
Formatter b6131e421c 提交 1 gadu atpakaļ
Loader b6131e421c 提交 1 gadu atpakaļ
Reader b6131e421c 提交 1 gadu atpakaļ
Resources b6131e421c 提交 1 gadu atpakaļ
Util b6131e421c 提交 1 gadu atpakaļ
Writer b6131e421c 提交 1 gadu atpakaļ
CHANGELOG.md b6131e421c 提交 1 gadu atpakaļ
DataCollectorTranslator.php b6131e421c 提交 1 gadu atpakaļ
IdentityTranslator.php b6131e421c 提交 1 gadu atpakaļ
Interval.php b6131e421c 提交 1 gadu atpakaļ
LICENSE b6131e421c 提交 1 gadu atpakaļ
LoggingTranslator.php b6131e421c 提交 1 gadu atpakaļ
MessageCatalogue.php b6131e421c 提交 1 gadu atpakaļ
MessageCatalogueInterface.php b6131e421c 提交 1 gadu atpakaļ
MessageSelector.php b6131e421c 提交 1 gadu atpakaļ
MetadataAwareInterface.php b6131e421c 提交 1 gadu atpakaļ
PluralizationRules.php b6131e421c 提交 1 gadu atpakaļ
README.md b6131e421c 提交 1 gadu atpakaļ
Translator.php b6131e421c 提交 1 gadu atpakaļ
TranslatorBagInterface.php b6131e421c 提交 1 gadu atpakaļ
TranslatorInterface.php b6131e421c 提交 1 gadu atpakaļ
composer.json b6131e421c 提交 1 gadu atpakaļ

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