root f4b10b55a0 Initial commit 1 ay önce
..
Catalogue f4b10b55a0 Initial commit 1 ay önce
Command f4b10b55a0 Initial commit 1 ay önce
DataCollector f4b10b55a0 Initial commit 1 ay önce
DependencyInjection f4b10b55a0 Initial commit 1 ay önce
Dumper f4b10b55a0 Initial commit 1 ay önce
Exception f4b10b55a0 Initial commit 1 ay önce
Extractor f4b10b55a0 Initial commit 1 ay önce
Formatter f4b10b55a0 Initial commit 1 ay önce
Loader f4b10b55a0 Initial commit 1 ay önce
Provider f4b10b55a0 Initial commit 1 ay önce
Reader f4b10b55a0 Initial commit 1 ay önce
Resources f4b10b55a0 Initial commit 1 ay önce
Test f4b10b55a0 Initial commit 1 ay önce
Util f4b10b55a0 Initial commit 1 ay önce
Writer f4b10b55a0 Initial commit 1 ay önce
CHANGELOG.md f4b10b55a0 Initial commit 1 ay önce
DataCollectorTranslator.php f4b10b55a0 Initial commit 1 ay önce
IdentityTranslator.php f4b10b55a0 Initial commit 1 ay önce
LICENSE f4b10b55a0 Initial commit 1 ay önce
LoggingTranslator.php f4b10b55a0 Initial commit 1 ay önce
MessageCatalogue.php f4b10b55a0 Initial commit 1 ay önce
MessageCatalogueInterface.php f4b10b55a0 Initial commit 1 ay önce
MetadataAwareInterface.php f4b10b55a0 Initial commit 1 ay önce
PseudoLocalizationTranslator.php f4b10b55a0 Initial commit 1 ay önce
README.md f4b10b55a0 Initial commit 1 ay önce
TranslatableMessage.php f4b10b55a0 Initial commit 1 ay önce
Translator.php f4b10b55a0 Initial commit 1 ay önce
TranslatorBag.php f4b10b55a0 Initial commit 1 ay önce
TranslatorBagInterface.php f4b10b55a0 Initial commit 1 ay önce
composer.json f4b10b55a0 Initial commit 1 ay önce

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