王大坤 577e175234 更新google hace 2 años
..
Catalogue 577e175234 更新google hace 2 años
Command 577e175234 更新google hace 2 años
DataCollector 577e175234 更新google hace 2 años
DependencyInjection 577e175234 更新google hace 2 años
Dumper 577e175234 更新google hace 2 años
Exception 577e175234 更新google hace 2 años
Extractor 577e175234 更新google hace 2 años
Formatter 577e175234 更新google hace 2 años
Loader 577e175234 更新google hace 2 años
Provider 577e175234 更新google hace 2 años
Reader 577e175234 更新google hace 2 años
Resources 577e175234 更新google hace 2 años
Test 577e175234 更新google hace 2 años
Util 577e175234 更新google hace 2 años
Writer 4122133d42 update hace 2 años
CHANGELOG.md 577e175234 更新google hace 2 años
CatalogueMetadataAwareInterface.php 577e175234 更新google hace 2 años
DataCollectorTranslator.php 577e175234 更新google hace 2 años
IdentityTranslator.php 4122133d42 update hace 2 años
LICENSE 577e175234 更新google hace 2 años
LocaleSwitcher.php 577e175234 更新google hace 2 años
LoggingTranslator.php 577e175234 更新google hace 2 años
MessageCatalogue.php 577e175234 更新google hace 2 años
MessageCatalogueInterface.php 577e175234 更新google hace 2 años
MetadataAwareInterface.php 577e175234 更新google hace 2 años
PseudoLocalizationTranslator.php 577e175234 更新google hace 2 años
README.md 577e175234 更新google hace 2 años
TranslatableMessage.php 4122133d42 update hace 2 años
Translator.php 577e175234 更新google hace 2 años
TranslatorBag.php 577e175234 更新google hace 2 años
TranslatorBagInterface.php 4122133d42 update hace 2 años
composer.json 577e175234 更新google hace 2 años

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 6.2 is backed by:

  • Crowdin, a cloud-based localization management software helping teams to go global and stay agile.

Help Symfony by sponsoring its development!

Resources