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

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