FestinHegre/vendor/symfony/translation
2024-09-26 17:26:04 +02:00
..
Catalogue Vendor 2024-09-26 17:26:04 +02:00
Command Vendor 2024-09-26 17:26:04 +02:00
DataCollector Vendor 2024-09-26 17:26:04 +02:00
DependencyInjection Vendor 2024-09-26 17:26:04 +02:00
Dumper Vendor 2024-09-26 17:26:04 +02:00
Exception Vendor 2024-09-26 17:26:04 +02:00
Extractor Vendor 2024-09-26 17:26:04 +02:00
Formatter Vendor 2024-09-26 17:26:04 +02:00
Loader Vendor 2024-09-26 17:26:04 +02:00
Provider Vendor 2024-09-26 17:26:04 +02:00
Reader Vendor 2024-09-26 17:26:04 +02:00
Resources Vendor 2024-09-26 17:26:04 +02:00
Test Vendor 2024-09-26 17:26:04 +02:00
Util Vendor 2024-09-26 17:26:04 +02:00
Writer Vendor 2024-09-26 17:26:04 +02:00
CatalogueMetadataAwareInterface.php Vendor 2024-09-26 17:26:04 +02:00
CHANGELOG.md Vendor 2024-09-26 17:26:04 +02:00
composer.json Vendor 2024-09-26 17:26:04 +02:00
DataCollectorTranslator.php Vendor 2024-09-26 17:26:04 +02:00
IdentityTranslator.php Vendor 2024-09-26 17:26:04 +02:00
LICENSE Vendor 2024-09-26 17:26:04 +02:00
LocaleSwitcher.php Vendor 2024-09-26 17:26:04 +02:00
LoggingTranslator.php Vendor 2024-09-26 17:26:04 +02:00
MessageCatalogue.php Vendor 2024-09-26 17:26:04 +02:00
MessageCatalogueInterface.php Vendor 2024-09-26 17:26:04 +02:00
MetadataAwareInterface.php Vendor 2024-09-26 17:26:04 +02:00
PseudoLocalizationTranslator.php Vendor 2024-09-26 17:26:04 +02:00
README.md Vendor 2024-09-26 17:26:04 +02:00
TranslatableMessage.php Vendor 2024-09-26 17:26:04 +02:00
Translator.php Vendor 2024-09-26 17:26:04 +02:00
TranslatorBag.php Vendor 2024-09-26 17:26:04 +02:00
TranslatorBagInterface.php Vendor 2024-09-26 17:26:04 +02:00

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 7.1 is backed by:

  • Crowdin, a cloud-based localization management software helping teams to go global and stay agile.

Help Symfony by sponsoring its development!

Resources