urban 5cc30c4fee first commit 2 bulan lalu
..
Catalogue 5cc30c4fee first commit 2 bulan lalu
Command 5cc30c4fee first commit 2 bulan lalu
DataCollector 5cc30c4fee first commit 2 bulan lalu
DependencyInjection 5cc30c4fee first commit 2 bulan lalu
Dumper 5cc30c4fee first commit 2 bulan lalu
Exception 5cc30c4fee first commit 2 bulan lalu
Extractor 5cc30c4fee first commit 2 bulan lalu
Formatter 5cc30c4fee first commit 2 bulan lalu
Loader 5cc30c4fee first commit 2 bulan lalu
Provider 5cc30c4fee first commit 2 bulan lalu
Reader 5cc30c4fee first commit 2 bulan lalu
Resources 5cc30c4fee first commit 2 bulan lalu
Test 5cc30c4fee first commit 2 bulan lalu
Util 5cc30c4fee first commit 2 bulan lalu
Writer 5cc30c4fee first commit 2 bulan lalu
CHANGELOG.md 5cc30c4fee first commit 2 bulan lalu
DataCollectorTranslator.php 5cc30c4fee first commit 2 bulan lalu
IdentityTranslator.php 5cc30c4fee first commit 2 bulan lalu
LICENSE 5cc30c4fee first commit 2 bulan lalu
LoggingTranslator.php 5cc30c4fee first commit 2 bulan lalu
MessageCatalogue.php 5cc30c4fee first commit 2 bulan lalu
MessageCatalogueInterface.php 5cc30c4fee first commit 2 bulan lalu
MetadataAwareInterface.php 5cc30c4fee first commit 2 bulan lalu
PseudoLocalizationTranslator.php 5cc30c4fee first commit 2 bulan lalu
README.md 5cc30c4fee first commit 2 bulan lalu
TranslatableMessage.php 5cc30c4fee first commit 2 bulan lalu
Translator.php 5cc30c4fee first commit 2 bulan lalu
TranslatorBag.php 5cc30c4fee first commit 2 bulan lalu
TranslatorBagInterface.php 5cc30c4fee first commit 2 bulan lalu
composer.json 5cc30c4fee first commit 2 bulan lalu

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