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

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