im/vendor/symfony/translation
weiz 22d166de26 update 2023-09-26 18:09:46 +08:00
..
Catalogue update 2023-09-26 18:09:46 +08:00
Command update 2023-09-26 18:09:46 +08:00
DataCollector update 2023-09-26 18:09:46 +08:00
DependencyInjection update 2023-09-26 18:09:46 +08:00
Dumper update 2023-09-26 18:09:46 +08:00
Exception update 2023-09-26 18:09:46 +08:00
Extractor update 2023-09-26 18:09:46 +08:00
Formatter update 2023-09-26 18:09:46 +08:00
Loader update 2023-09-26 18:09:46 +08:00
Provider update 2023-09-26 18:09:46 +08:00
Reader update 2023-09-26 18:09:46 +08:00
Resources update 2023-09-26 18:09:46 +08:00
Test update 2023-09-26 18:09:46 +08:00
Util update 2023-09-26 18:09:46 +08:00
Writer update 2023-09-26 18:09:46 +08:00
CHANGELOG.md update 2023-09-26 18:09:46 +08:00
DataCollectorTranslator.php update 2023-09-26 18:09:46 +08:00
IdentityTranslator.php update 2023-09-26 18:09:46 +08:00
LICENSE update 2023-09-26 18:09:46 +08:00
LoggingTranslator.php update 2023-09-26 18:09:46 +08:00
MessageCatalogue.php update 2023-09-26 18:09:46 +08:00
MessageCatalogueInterface.php update 2023-09-26 18:09:46 +08:00
MetadataAwareInterface.php update 2023-09-26 18:09:46 +08:00
PseudoLocalizationTranslator.php update 2023-09-26 18:09:46 +08:00
README.md update 2023-09-26 18:09:46 +08:00
TranslatableMessage.php update 2023-09-26 18:09:46 +08:00
Translator.php update 2023-09-26 18:09:46 +08:00
TranslatorBag.php update 2023-09-26 18:09:46 +08:00
TranslatorBagInterface.php update 2023-09-26 18:09:46 +08:00
composer.json update 2023-09-26 18:09:46 +08:00

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