luck-draw/vendor/symfony/translation
wangxinglong 31e9432ba0 初始化 2022-02-22 17:27:27 +08:00
..
Catalogue 初始化 2022-02-22 17:27:27 +08:00
Command 初始化 2022-02-22 17:27:27 +08:00
DataCollector 初始化 2022-02-22 17:27:27 +08:00
DependencyInjection 初始化 2022-02-22 17:27:27 +08:00
Dumper 初始化 2022-02-22 17:27:27 +08:00
Exception 初始化 2022-02-22 17:27:27 +08:00
Extractor 初始化 2022-02-22 17:27:27 +08:00
Formatter 初始化 2022-02-22 17:27:27 +08:00
Loader 初始化 2022-02-22 17:27:27 +08:00
Provider 初始化 2022-02-22 17:27:27 +08:00
Reader 初始化 2022-02-22 17:27:27 +08:00
Resources 初始化 2022-02-22 17:27:27 +08:00
Test 初始化 2022-02-22 17:27:27 +08:00
Util 初始化 2022-02-22 17:27:27 +08:00
Writer 初始化 2022-02-22 17:27:27 +08:00
CHANGELOG.md 初始化 2022-02-22 17:27:27 +08:00
DataCollectorTranslator.php 初始化 2022-02-22 17:27:27 +08:00
IdentityTranslator.php 初始化 2022-02-22 17:27:27 +08:00
LICENSE 初始化 2022-02-22 17:27:27 +08:00
LoggingTranslator.php 初始化 2022-02-22 17:27:27 +08:00
MessageCatalogue.php 初始化 2022-02-22 17:27:27 +08:00
MessageCatalogueInterface.php 初始化 2022-02-22 17:27:27 +08:00
MetadataAwareInterface.php 初始化 2022-02-22 17:27:27 +08:00
PseudoLocalizationTranslator.php 初始化 2022-02-22 17:27:27 +08:00
README.md 初始化 2022-02-22 17:27:27 +08:00
TranslatableMessage.php 初始化 2022-02-22 17:27:27 +08:00
Translator.php 初始化 2022-02-22 17:27:27 +08:00
TranslatorBag.php 初始化 2022-02-22 17:27:27 +08:00
TranslatorBagInterface.php 初始化 2022-02-22 17:27:27 +08:00
composer.json 初始化 2022-02-22 17:27:27 +08:00

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