xieruidong aa6a296225 merchant 2 anni fa
..
Catalogue a92a1834a2 1 2 anni fa
Command a92a1834a2 1 2 anni fa
DataCollector a92a1834a2 1 2 anni fa
DependencyInjection a92a1834a2 1 2 anni fa
Dumper a92a1834a2 1 2 anni fa
Exception a92a1834a2 1 2 anni fa
Extractor a92a1834a2 1 2 anni fa
Formatter a92a1834a2 1 2 anni fa
Loader a92a1834a2 1 2 anni fa
Provider a92a1834a2 1 2 anni fa
Reader a92a1834a2 1 2 anni fa
Resources aa6a296225 merchant 2 anni fa
Test a92a1834a2 1 2 anni fa
Util a92a1834a2 1 2 anni fa
Writer a92a1834a2 1 2 anni fa
CHANGELOG.md a92a1834a2 1 2 anni fa
DataCollectorTranslator.php a92a1834a2 1 2 anni fa
IdentityTranslator.php a92a1834a2 1 2 anni fa
LICENSE aa6a296225 merchant 2 anni fa
LoggingTranslator.php a92a1834a2 1 2 anni fa
MessageCatalogue.php a92a1834a2 1 2 anni fa
MessageCatalogueInterface.php a92a1834a2 1 2 anni fa
MetadataAwareInterface.php a92a1834a2 1 2 anni fa
PseudoLocalizationTranslator.php a92a1834a2 1 2 anni fa
README.md a92a1834a2 1 2 anni fa
TranslatableMessage.php a92a1834a2 1 2 anni fa
Translator.php a92a1834a2 1 2 anni fa
TranslatorBag.php a92a1834a2 1 2 anni fa
TranslatorBagInterface.php a92a1834a2 1 2 anni fa
composer.json a92a1834a2 1 2 anni fa

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