urban 02fbfd43e2 codes commit 10 сар өмнө
..
Catalogue 02fbfd43e2 codes commit 10 сар өмнө
Command 02fbfd43e2 codes commit 10 сар өмнө
DataCollector 02fbfd43e2 codes commit 10 сар өмнө
DependencyInjection 02fbfd43e2 codes commit 10 сар өмнө
Dumper 02fbfd43e2 codes commit 10 сар өмнө
Exception 02fbfd43e2 codes commit 10 сар өмнө
Extractor 02fbfd43e2 codes commit 10 сар өмнө
Formatter 02fbfd43e2 codes commit 10 сар өмнө
Loader 02fbfd43e2 codes commit 10 сар өмнө
Provider 02fbfd43e2 codes commit 10 сар өмнө
Reader 02fbfd43e2 codes commit 10 сар өмнө
Resources 02fbfd43e2 codes commit 10 сар өмнө
Test 02fbfd43e2 codes commit 10 сар өмнө
Util 02fbfd43e2 codes commit 10 сар өмнө
Writer 02fbfd43e2 codes commit 10 сар өмнө
CHANGELOG.md 02fbfd43e2 codes commit 10 сар өмнө
DataCollectorTranslator.php 02fbfd43e2 codes commit 10 сар өмнө
IdentityTranslator.php 02fbfd43e2 codes commit 10 сар өмнө
LICENSE 02fbfd43e2 codes commit 10 сар өмнө
LoggingTranslator.php 02fbfd43e2 codes commit 10 сар өмнө
MessageCatalogue.php 02fbfd43e2 codes commit 10 сар өмнө
MessageCatalogueInterface.php 02fbfd43e2 codes commit 10 сар өмнө
MetadataAwareInterface.php 02fbfd43e2 codes commit 10 сар өмнө
PseudoLocalizationTranslator.php 02fbfd43e2 codes commit 10 сар өмнө
README.md 02fbfd43e2 codes commit 10 сар өмнө
TranslatableMessage.php 02fbfd43e2 codes commit 10 сар өмнө
Translator.php 02fbfd43e2 codes commit 10 сар өмнө
TranslatorBag.php 02fbfd43e2 codes commit 10 сар өмнө
TranslatorBagInterface.php 02fbfd43e2 codes commit 10 сар өмнө
composer.json 02fbfd43e2 codes 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 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