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

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