mailcow-dockerized/data/web/inc/lib/vendor/symfony/translation
2025-04-17 17:29:05 -05:00
..
Catalogue first 2025-04-17 17:29:05 -05:00
Command first 2025-04-17 17:29:05 -05:00
DataCollector first 2025-04-17 17:29:05 -05:00
DependencyInjection first 2025-04-17 17:29:05 -05:00
Dumper first 2025-04-17 17:29:05 -05:00
Exception first 2025-04-17 17:29:05 -05:00
Extractor first 2025-04-17 17:29:05 -05:00
Formatter first 2025-04-17 17:29:05 -05:00
Loader first 2025-04-17 17:29:05 -05:00
Provider first 2025-04-17 17:29:05 -05:00
Reader first 2025-04-17 17:29:05 -05:00
Resources first 2025-04-17 17:29:05 -05:00
Test first 2025-04-17 17:29:05 -05:00
Util first 2025-04-17 17:29:05 -05:00
Writer first 2025-04-17 17:29:05 -05:00
CHANGELOG.md first 2025-04-17 17:29:05 -05:00
composer.json first 2025-04-17 17:29:05 -05:00
DataCollectorTranslator.php first 2025-04-17 17:29:05 -05:00
IdentityTranslator.php first 2025-04-17 17:29:05 -05:00
LICENSE first 2025-04-17 17:29:05 -05:00
LoggingTranslator.php first 2025-04-17 17:29:05 -05:00
MessageCatalogue.php first 2025-04-17 17:29:05 -05:00
MessageCatalogueInterface.php first 2025-04-17 17:29:05 -05:00
MetadataAwareInterface.php first 2025-04-17 17:29:05 -05:00
PseudoLocalizationTranslator.php first 2025-04-17 17:29:05 -05:00
README.md first 2025-04-17 17:29:05 -05:00
TranslatableMessage.php first 2025-04-17 17:29:05 -05:00
Translator.php first 2025-04-17 17:29:05 -05:00
TranslatorBag.php first 2025-04-17 17:29:05 -05:00
TranslatorBagInterface.php first 2025-04-17 17:29:05 -05: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 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