Musa 4547782a4a first commit 1 год назад
..
Catalogue 4547782a4a first commit 1 год назад
Command 4547782a4a first commit 1 год назад
DataCollector 4547782a4a first commit 1 год назад
DependencyInjection 4547782a4a first commit 1 год назад
Dumper 4547782a4a first commit 1 год назад
Exception 4547782a4a first commit 1 год назад
Extractor 4547782a4a first commit 1 год назад
Formatter 4547782a4a first commit 1 год назад
Loader 4547782a4a first commit 1 год назад
Provider 4547782a4a first commit 1 год назад
Reader 4547782a4a first commit 1 год назад
Resources 4547782a4a first commit 1 год назад
Test 4547782a4a first commit 1 год назад
Util 4547782a4a first commit 1 год назад
Writer 4547782a4a first commit 1 год назад
CHANGELOG.md 4547782a4a first commit 1 год назад
CatalogueMetadataAwareInterface.php 4547782a4a first commit 1 год назад
DataCollectorTranslator.php 4547782a4a first commit 1 год назад
IdentityTranslator.php 4547782a4a first commit 1 год назад
LICENSE 4547782a4a first commit 1 год назад
LocaleSwitcher.php 4547782a4a first commit 1 год назад
LoggingTranslator.php 4547782a4a first commit 1 год назад
MessageCatalogue.php 4547782a4a first commit 1 год назад
MessageCatalogueInterface.php 4547782a4a first commit 1 год назад
MetadataAwareInterface.php 4547782a4a first commit 1 год назад
PseudoLocalizationTranslator.php 4547782a4a first commit 1 год назад
README.md 4547782a4a first commit 1 год назад
TranslatableMessage.php 4547782a4a first commit 1 год назад
Translator.php 4547782a4a first commit 1 год назад
TranslatorBag.php 4547782a4a first commit 1 год назад
TranslatorBagInterface.php 4547782a4a first commit 1 год назад
composer.json 4547782a4a 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 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