zhangdehua 898e06e04e first commit il y a 2 ans
..
Catalogue 898e06e04e first commit il y a 2 ans
Command 898e06e04e first commit il y a 2 ans
DataCollector 898e06e04e first commit il y a 2 ans
DependencyInjection 898e06e04e first commit il y a 2 ans
Dumper 898e06e04e first commit il y a 2 ans
Exception 898e06e04e first commit il y a 2 ans
Extractor 898e06e04e first commit il y a 2 ans
Formatter 898e06e04e first commit il y a 2 ans
Loader 898e06e04e first commit il y a 2 ans
Provider 898e06e04e first commit il y a 2 ans
Reader 898e06e04e first commit il y a 2 ans
Resources 898e06e04e first commit il y a 2 ans
Test 898e06e04e first commit il y a 2 ans
Util 898e06e04e first commit il y a 2 ans
Writer 898e06e04e first commit il y a 2 ans
CHANGELOG.md 898e06e04e first commit il y a 2 ans
CatalogueMetadataAwareInterface.php 898e06e04e first commit il y a 2 ans
DataCollectorTranslator.php 898e06e04e first commit il y a 2 ans
IdentityTranslator.php 898e06e04e first commit il y a 2 ans
LICENSE 898e06e04e first commit il y a 2 ans
LocaleSwitcher.php 898e06e04e first commit il y a 2 ans
LoggingTranslator.php 898e06e04e first commit il y a 2 ans
MessageCatalogue.php 898e06e04e first commit il y a 2 ans
MessageCatalogueInterface.php 898e06e04e first commit il y a 2 ans
MetadataAwareInterface.php 898e06e04e first commit il y a 2 ans
PseudoLocalizationTranslator.php 898e06e04e first commit il y a 2 ans
README.md 898e06e04e first commit il y a 2 ans
TranslatableMessage.php 898e06e04e first commit il y a 2 ans
Translator.php 898e06e04e first commit il y a 2 ans
TranslatorBag.php 898e06e04e first commit il y a 2 ans
TranslatorBagInterface.php 898e06e04e first commit il y a 2 ans
composer.json 898e06e04e first commit il y a 2 ans

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

Sponsor

The Translation component for Symfony 6.1 is backed by:

  • Crowdin, a cloud-based localization management software helping teams to go global and stay agile.

Help Symfony by sponsoring its development!

Resources