unknown abd0e89a86 second commit 1 月之前
..
Catalogue abd0e89a86 second commit 1 月之前
Command abd0e89a86 second commit 1 月之前
DataCollector abd0e89a86 second commit 1 月之前
DependencyInjection abd0e89a86 second commit 1 月之前
Dumper abd0e89a86 second commit 1 月之前
Exception abd0e89a86 second commit 1 月之前
Extractor abd0e89a86 second commit 1 月之前
Formatter abd0e89a86 second commit 1 月之前
Loader abd0e89a86 second commit 1 月之前
Provider abd0e89a86 second commit 1 月之前
Reader abd0e89a86 second commit 1 月之前
Resources abd0e89a86 second commit 1 月之前
Test abd0e89a86 second commit 1 月之前
Util abd0e89a86 second commit 1 月之前
Writer abd0e89a86 second commit 1 月之前
CHANGELOG.md abd0e89a86 second commit 1 月之前
CatalogueMetadataAwareInterface.php abd0e89a86 second commit 1 月之前
DataCollectorTranslator.php abd0e89a86 second commit 1 月之前
IdentityTranslator.php abd0e89a86 second commit 1 月之前
LICENSE abd0e89a86 second commit 1 月之前
LocaleSwitcher.php abd0e89a86 second commit 1 月之前
LoggingTranslator.php abd0e89a86 second commit 1 月之前
MessageCatalogue.php abd0e89a86 second commit 1 月之前
MessageCatalogueInterface.php abd0e89a86 second commit 1 月之前
MetadataAwareInterface.php abd0e89a86 second commit 1 月之前
PseudoLocalizationTranslator.php abd0e89a86 second commit 1 月之前
README.md abd0e89a86 second commit 1 月之前
StaticMessage.php abd0e89a86 second commit 1 月之前
TranslatableMessage.php abd0e89a86 second commit 1 月之前
Translator.php abd0e89a86 second commit 1 月之前
TranslatorBag.php abd0e89a86 second commit 1 月之前
TranslatorBagInterface.php abd0e89a86 second commit 1 月之前
composer.json abd0e89a86 second commit 1 月之前

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

Help Symfony by sponsoring its development!

Resources