唐金木 07e2592bdb first commit 4 years ago
..
Catalogue 07e2592bdb first commit 4 years ago
Command 07e2592bdb first commit 4 years ago
DataCollector 07e2592bdb first commit 4 years ago
DependencyInjection 07e2592bdb first commit 4 years ago
Dumper 07e2592bdb first commit 4 years ago
Exception 07e2592bdb first commit 4 years ago
Extractor 07e2592bdb first commit 4 years ago
Formatter 07e2592bdb first commit 4 years ago
Loader 07e2592bdb first commit 4 years ago
Reader 07e2592bdb first commit 4 years ago
Resources 07e2592bdb first commit 4 years ago
Util 07e2592bdb first commit 4 years ago
Writer 07e2592bdb first commit 4 years ago
.gitattributes 07e2592bdb first commit 4 years ago
CHANGELOG.md 07e2592bdb first commit 4 years ago
DataCollectorTranslator.php 07e2592bdb first commit 4 years ago
IdentityTranslator.php 07e2592bdb first commit 4 years ago
LICENSE 07e2592bdb first commit 4 years ago
LoggingTranslator.php 07e2592bdb first commit 4 years ago
MessageCatalogue.php 07e2592bdb first commit 4 years ago
MessageCatalogueInterface.php 07e2592bdb first commit 4 years ago
MetadataAwareInterface.php 07e2592bdb first commit 4 years ago
README.md 07e2592bdb first commit 4 years ago
Translator.php 07e2592bdb first commit 4 years ago
TranslatorBagInterface.php 07e2592bdb first commit 4 years ago
composer.json 07e2592bdb first commit 4 years ago

README.md

Translation Component

The Translation component provides tools to internationalize your application.

Getting Started

$ composer require symfony/translation
use Symfony\Component\Translation\Translator;

$translator = new Translator('fr_FR');
$translator->addResource('array', [
    'Hello World!' => 'Bonjour !',
], 'fr_FR');

echo $translator->trans('Hello World!'); // outputs « Bonjour ! »

Resources