zhangdehua 898e06e04e first commit 1 سال پیش
..
Catalogue 898e06e04e first commit 1 سال پیش
Command 898e06e04e first commit 1 سال پیش
DataCollector 898e06e04e first commit 1 سال پیش
DependencyInjection 898e06e04e first commit 1 سال پیش
Dumper 898e06e04e first commit 1 سال پیش
Exception 898e06e04e first commit 1 سال پیش
Extractor 898e06e04e first commit 1 سال پیش
Formatter 898e06e04e first commit 1 سال پیش
Loader 898e06e04e first commit 1 سال پیش
Provider 898e06e04e first commit 1 سال پیش
Reader 898e06e04e first commit 1 سال پیش
Resources 898e06e04e first commit 1 سال پیش
Test 898e06e04e first commit 1 سال پیش
Util 898e06e04e first commit 1 سال پیش
Writer 898e06e04e first commit 1 سال پیش
CHANGELOG.md 898e06e04e first commit 1 سال پیش
CatalogueMetadataAwareInterface.php 898e06e04e first commit 1 سال پیش
DataCollectorTranslator.php 898e06e04e first commit 1 سال پیش
IdentityTranslator.php 898e06e04e first commit 1 سال پیش
LICENSE 898e06e04e first commit 1 سال پیش
LocaleSwitcher.php 898e06e04e first commit 1 سال پیش
LoggingTranslator.php 898e06e04e first commit 1 سال پیش
MessageCatalogue.php 898e06e04e first commit 1 سال پیش
MessageCatalogueInterface.php 898e06e04e first commit 1 سال پیش
MetadataAwareInterface.php 898e06e04e first commit 1 سال پیش
PseudoLocalizationTranslator.php 898e06e04e first commit 1 سال پیش
README.md 898e06e04e first commit 1 سال پیش
TranslatableMessage.php 898e06e04e first commit 1 سال پیش
Translator.php 898e06e04e first commit 1 سال پیش
TranslatorBag.php 898e06e04e first commit 1 سال پیش
TranslatorBagInterface.php 898e06e04e first commit 1 سال پیش
composer.json 898e06e04e first commit 1 سال پیش

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