Musa 4547782a4a first commit 10 ماه پیش
..
Catalogue 4547782a4a first commit 10 ماه پیش
Command 4547782a4a first commit 10 ماه پیش
DataCollector 4547782a4a first commit 10 ماه پیش
DependencyInjection 4547782a4a first commit 10 ماه پیش
Dumper 4547782a4a first commit 10 ماه پیش
Exception 4547782a4a first commit 10 ماه پیش
Extractor 4547782a4a first commit 10 ماه پیش
Formatter 4547782a4a first commit 10 ماه پیش
Loader 4547782a4a first commit 10 ماه پیش
Provider 4547782a4a first commit 10 ماه پیش
Reader 4547782a4a first commit 10 ماه پیش
Resources 4547782a4a first commit 10 ماه پیش
Test 4547782a4a first commit 10 ماه پیش
Util 4547782a4a first commit 10 ماه پیش
Writer 4547782a4a first commit 10 ماه پیش
CHANGELOG.md 4547782a4a first commit 10 ماه پیش
CatalogueMetadataAwareInterface.php 4547782a4a first commit 10 ماه پیش
DataCollectorTranslator.php 4547782a4a first commit 10 ماه پیش
IdentityTranslator.php 4547782a4a first commit 10 ماه پیش
LICENSE 4547782a4a first commit 10 ماه پیش
LocaleSwitcher.php 4547782a4a first commit 10 ماه پیش
LoggingTranslator.php 4547782a4a first commit 10 ماه پیش
MessageCatalogue.php 4547782a4a first commit 10 ماه پیش
MessageCatalogueInterface.php 4547782a4a first commit 10 ماه پیش
MetadataAwareInterface.php 4547782a4a first commit 10 ماه پیش
PseudoLocalizationTranslator.php 4547782a4a first commit 10 ماه پیش
README.md 4547782a4a first commit 10 ماه پیش
TranslatableMessage.php 4547782a4a first commit 10 ماه پیش
Translator.php 4547782a4a first commit 10 ماه پیش
TranslatorBag.php 4547782a4a first commit 10 ماه پیش
TranslatorBagInterface.php 4547782a4a first commit 10 ماه پیش
composer.json 4547782a4a first commit 10 ماه پیش

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 7.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