王大坤 4122133d42 update il y a 2 ans
..
Catalogue 4122133d42 update il y a 2 ans
Command 4122133d42 update il y a 2 ans
DataCollector 4122133d42 update il y a 2 ans
DependencyInjection 4122133d42 update il y a 2 ans
Dumper 4122133d42 update il y a 2 ans
Exception 4122133d42 update il y a 2 ans
Extractor 4122133d42 update il y a 2 ans
Formatter 4122133d42 update il y a 2 ans
Loader 4122133d42 update il y a 2 ans
Provider 4122133d42 update il y a 2 ans
Reader 4122133d42 update il y a 2 ans
Resources 4122133d42 update il y a 2 ans
Test 4122133d42 update il y a 2 ans
Util 4122133d42 update il y a 2 ans
Writer 4122133d42 update il y a 2 ans
CHANGELOG.md 4122133d42 update il y a 2 ans
DataCollectorTranslator.php 4122133d42 update il y a 2 ans
IdentityTranslator.php 4122133d42 update il y a 2 ans
LICENSE 4122133d42 update il y a 2 ans
LoggingTranslator.php 4122133d42 update il y a 2 ans
MessageCatalogue.php 4122133d42 update il y a 2 ans
MessageCatalogueInterface.php 4122133d42 update il y a 2 ans
MetadataAwareInterface.php 4122133d42 update il y a 2 ans
PseudoLocalizationTranslator.php 4122133d42 update il y a 2 ans
README.md 4122133d42 update il y a 2 ans
TranslatableMessage.php 4122133d42 update il y a 2 ans
Translator.php 4122133d42 update il y a 2 ans
TranslatorBag.php 4122133d42 update il y a 2 ans
TranslatorBagInterface.php 4122133d42 update il y a 2 ans
composer.json 4122133d42 update 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 5.4/6.0 is backed by:

  • Crowdin, a cloud-based localization management software helping teams to go global and stay agile.
  • Lokalise, a continuous localization and translation management platform that integrates into your development workflow so you can ship localized products, faster.

Help Symfony by sponsoring its development!

Resources