swoole-framwork/vendor/symfony/translation
2024-05-20 11:51:07 +08:00
..
Catalogue code 2024-05-20 11:51:07 +08:00
Command code 2024-05-20 11:51:07 +08:00
DataCollector code 2024-05-20 11:51:07 +08:00
DependencyInjection code 2024-05-20 11:51:07 +08:00
Dumper code 2024-05-20 11:51:07 +08:00
Exception code 2024-05-20 11:51:07 +08:00
Extractor code 2024-05-20 11:51:07 +08:00
Formatter code 2024-05-20 11:51:07 +08:00
Loader code 2024-05-20 11:51:07 +08:00
Provider code 2024-05-20 11:51:07 +08:00
Reader code 2024-05-20 11:51:07 +08:00
Resources code 2024-05-20 11:51:07 +08:00
Test code 2024-05-20 11:51:07 +08:00
Util code 2024-05-20 11:51:07 +08:00
Writer code 2024-05-20 11:51:07 +08:00
CatalogueMetadataAwareInterface.php code 2024-05-20 11:51:07 +08:00
CHANGELOG.md code 2024-05-20 11:51:07 +08:00
composer.json code 2024-05-20 11:51:07 +08:00
DataCollectorTranslator.php code 2024-05-20 11:51:07 +08:00
IdentityTranslator.php code 2024-05-20 11:51:07 +08:00
LICENSE code 2024-05-20 11:51:07 +08:00
LocaleSwitcher.php code 2024-05-20 11:51:07 +08:00
LoggingTranslator.php code 2024-05-20 11:51:07 +08:00
MessageCatalogue.php code 2024-05-20 11:51:07 +08:00
MessageCatalogueInterface.php code 2024-05-20 11:51:07 +08:00
MetadataAwareInterface.php code 2024-05-20 11:51:07 +08:00
PseudoLocalizationTranslator.php code 2024-05-20 11:51:07 +08:00
README.md code 2024-05-20 11:51:07 +08:00
TranslatableMessage.php code 2024-05-20 11:51:07 +08:00
Translator.php code 2024-05-20 11:51:07 +08:00
TranslatorBag.php code 2024-05-20 11:51:07 +08:00
TranslatorBagInterface.php code 2024-05-20 11:51:07 +08: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

Help Symfony by sponsoring its development!

Resources