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