jun 241d78f74c first commit 4 روز پیش
..
Catalogue 241d78f74c first commit 4 روز پیش
Command 241d78f74c first commit 4 روز پیش
DataCollector 241d78f74c first commit 4 روز پیش
DependencyInjection 241d78f74c first commit 4 روز پیش
Dumper 241d78f74c first commit 4 روز پیش
Exception 241d78f74c first commit 4 روز پیش
Extractor 241d78f74c first commit 4 روز پیش
Formatter 241d78f74c first commit 4 روز پیش
Loader 241d78f74c first commit 4 روز پیش
Provider 241d78f74c first commit 4 روز پیش
Reader 241d78f74c first commit 4 روز پیش
Resources 241d78f74c first commit 4 روز پیش
Test 241d78f74c first commit 4 روز پیش
Util 241d78f74c first commit 4 روز پیش
Writer 241d78f74c first commit 4 روز پیش
CHANGELOG.md 241d78f74c first commit 4 روز پیش
DataCollectorTranslator.php 241d78f74c first commit 4 روز پیش
IdentityTranslator.php 241d78f74c first commit 4 روز پیش
LICENSE 241d78f74c first commit 4 روز پیش
LoggingTranslator.php 241d78f74c first commit 4 روز پیش
MessageCatalogue.php 241d78f74c first commit 4 روز پیش
MessageCatalogueInterface.php 241d78f74c first commit 4 روز پیش
MetadataAwareInterface.php 241d78f74c first commit 4 روز پیش
PseudoLocalizationTranslator.php 241d78f74c first commit 4 روز پیش
README.md 241d78f74c first commit 4 روز پیش
TranslatableMessage.php 241d78f74c first commit 4 روز پیش
Translator.php 241d78f74c first commit 4 روز پیش
TranslatorBag.php 241d78f74c first commit 4 روز پیش
TranslatorBagInterface.php 241d78f74c first commit 4 روز پیش
composer.json 241d78f74c first commit 4 روز پیش

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