lizhen_gitee 414078cafe vendor加入版本库 1 rok pred
..
Catalogue 414078cafe vendor加入版本库 1 rok pred
Command 414078cafe vendor加入版本库 1 rok pred
DataCollector 414078cafe vendor加入版本库 1 rok pred
DependencyInjection 414078cafe vendor加入版本库 1 rok pred
Dumper 414078cafe vendor加入版本库 1 rok pred
Exception 414078cafe vendor加入版本库 1 rok pred
Extractor 414078cafe vendor加入版本库 1 rok pred
Formatter 414078cafe vendor加入版本库 1 rok pred
Loader 414078cafe vendor加入版本库 1 rok pred
Provider 414078cafe vendor加入版本库 1 rok pred
Reader 414078cafe vendor加入版本库 1 rok pred
Resources 414078cafe vendor加入版本库 1 rok pred
Test 414078cafe vendor加入版本库 1 rok pred
Util 414078cafe vendor加入版本库 1 rok pred
Writer 414078cafe vendor加入版本库 1 rok pred
CHANGELOG.md 414078cafe vendor加入版本库 1 rok pred
DataCollectorTranslator.php 414078cafe vendor加入版本库 1 rok pred
IdentityTranslator.php 414078cafe vendor加入版本库 1 rok pred
LICENSE 414078cafe vendor加入版本库 1 rok pred
LoggingTranslator.php 414078cafe vendor加入版本库 1 rok pred
MessageCatalogue.php 414078cafe vendor加入版本库 1 rok pred
MessageCatalogueInterface.php 414078cafe vendor加入版本库 1 rok pred
MetadataAwareInterface.php 414078cafe vendor加入版本库 1 rok pred
PseudoLocalizationTranslator.php 414078cafe vendor加入版本库 1 rok pred
README.md 414078cafe vendor加入版本库 1 rok pred
TranslatableMessage.php 414078cafe vendor加入版本库 1 rok pred
Translator.php 414078cafe vendor加入版本库 1 rok pred
TranslatorBag.php 414078cafe vendor加入版本库 1 rok pred
TranslatorBagInterface.php 414078cafe vendor加入版本库 1 rok pred
composer.json 414078cafe vendor加入版本库 1 rok pred

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 5.4/6.0 is backed by:

  • Crowdin, a cloud-based localization management software helping teams to go global and stay agile.
  • Lokalise, a continuous localization and translation management platform that integrates into your development workflow so you can ship localized products, faster.

Help Symfony by sponsoring its development!

Resources