urban 02fbfd43e2 codes commit 3 viikkoa sitten
..
Catalogue 02fbfd43e2 codes commit 3 viikkoa sitten
Command 02fbfd43e2 codes commit 3 viikkoa sitten
DataCollector 02fbfd43e2 codes commit 3 viikkoa sitten
DependencyInjection 02fbfd43e2 codes commit 3 viikkoa sitten
Dumper 02fbfd43e2 codes commit 3 viikkoa sitten
Exception 02fbfd43e2 codes commit 3 viikkoa sitten
Extractor 02fbfd43e2 codes commit 3 viikkoa sitten
Formatter 02fbfd43e2 codes commit 3 viikkoa sitten
Loader 02fbfd43e2 codes commit 3 viikkoa sitten
Provider 02fbfd43e2 codes commit 3 viikkoa sitten
Reader 02fbfd43e2 codes commit 3 viikkoa sitten
Resources 02fbfd43e2 codes commit 3 viikkoa sitten
Test 02fbfd43e2 codes commit 3 viikkoa sitten
Util 02fbfd43e2 codes commit 3 viikkoa sitten
Writer 02fbfd43e2 codes commit 3 viikkoa sitten
CHANGELOG.md 02fbfd43e2 codes commit 3 viikkoa sitten
DataCollectorTranslator.php 02fbfd43e2 codes commit 3 viikkoa sitten
IdentityTranslator.php 02fbfd43e2 codes commit 3 viikkoa sitten
LICENSE 02fbfd43e2 codes commit 3 viikkoa sitten
LoggingTranslator.php 02fbfd43e2 codes commit 3 viikkoa sitten
MessageCatalogue.php 02fbfd43e2 codes commit 3 viikkoa sitten
MessageCatalogueInterface.php 02fbfd43e2 codes commit 3 viikkoa sitten
MetadataAwareInterface.php 02fbfd43e2 codes commit 3 viikkoa sitten
PseudoLocalizationTranslator.php 02fbfd43e2 codes commit 3 viikkoa sitten
README.md 02fbfd43e2 codes commit 3 viikkoa sitten
TranslatableMessage.php 02fbfd43e2 codes commit 3 viikkoa sitten
Translator.php 02fbfd43e2 codes commit 3 viikkoa sitten
TranslatorBag.php 02fbfd43e2 codes commit 3 viikkoa sitten
TranslatorBagInterface.php 02fbfd43e2 codes commit 3 viikkoa sitten
composer.json 02fbfd43e2 codes commit 3 viikkoa sitten

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