lizhen_gitee 5b0b0cc080 vendor 10 bulan lalu
..
Catalogue 5b0b0cc080 vendor 10 bulan lalu
Command 5b0b0cc080 vendor 10 bulan lalu
DataCollector 5b0b0cc080 vendor 10 bulan lalu
DependencyInjection 5b0b0cc080 vendor 10 bulan lalu
Dumper 5b0b0cc080 vendor 10 bulan lalu
Exception 5b0b0cc080 vendor 10 bulan lalu
Extractor 5b0b0cc080 vendor 10 bulan lalu
Formatter 5b0b0cc080 vendor 10 bulan lalu
Loader 5b0b0cc080 vendor 10 bulan lalu
Provider 5b0b0cc080 vendor 10 bulan lalu
Reader 5b0b0cc080 vendor 10 bulan lalu
Resources 5b0b0cc080 vendor 10 bulan lalu
Test 5b0b0cc080 vendor 10 bulan lalu
Util 5b0b0cc080 vendor 10 bulan lalu
Writer 5b0b0cc080 vendor 10 bulan lalu
CHANGELOG.md 5b0b0cc080 vendor 10 bulan lalu
DataCollectorTranslator.php 5b0b0cc080 vendor 10 bulan lalu
IdentityTranslator.php 5b0b0cc080 vendor 10 bulan lalu
LICENSE 5b0b0cc080 vendor 10 bulan lalu
LoggingTranslator.php 5b0b0cc080 vendor 10 bulan lalu
MessageCatalogue.php 5b0b0cc080 vendor 10 bulan lalu
MessageCatalogueInterface.php 5b0b0cc080 vendor 10 bulan lalu
MetadataAwareInterface.php 5b0b0cc080 vendor 10 bulan lalu
PseudoLocalizationTranslator.php 5b0b0cc080 vendor 10 bulan lalu
README.md 5b0b0cc080 vendor 10 bulan lalu
TranslatableMessage.php 5b0b0cc080 vendor 10 bulan lalu
Translator.php 5b0b0cc080 vendor 10 bulan lalu
TranslatorBag.php 5b0b0cc080 vendor 10 bulan lalu
TranslatorBagInterface.php 5b0b0cc080 vendor 10 bulan lalu
composer.json 5b0b0cc080 vendor 10 bulan lalu

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