zhangdehua 898e06e04e first commit преди 2 години
..
Catalogue 898e06e04e first commit преди 2 години
Command 898e06e04e first commit преди 2 години
DataCollector 898e06e04e first commit преди 2 години
DependencyInjection 898e06e04e first commit преди 2 години
Dumper 898e06e04e first commit преди 2 години
Exception 898e06e04e first commit преди 2 години
Extractor 898e06e04e first commit преди 2 години
Formatter 898e06e04e first commit преди 2 години
Loader 898e06e04e first commit преди 2 години
Provider 898e06e04e first commit преди 2 години
Reader 898e06e04e first commit преди 2 години
Resources 898e06e04e first commit преди 2 години
Test 898e06e04e first commit преди 2 години
Util 898e06e04e first commit преди 2 години
Writer 898e06e04e first commit преди 2 години
CHANGELOG.md 898e06e04e first commit преди 2 години
CatalogueMetadataAwareInterface.php 898e06e04e first commit преди 2 години
DataCollectorTranslator.php 898e06e04e first commit преди 2 години
IdentityTranslator.php 898e06e04e first commit преди 2 години
LICENSE 898e06e04e first commit преди 2 години
LocaleSwitcher.php 898e06e04e first commit преди 2 години
LoggingTranslator.php 898e06e04e first commit преди 2 години
MessageCatalogue.php 898e06e04e first commit преди 2 години
MessageCatalogueInterface.php 898e06e04e first commit преди 2 години
MetadataAwareInterface.php 898e06e04e first commit преди 2 години
PseudoLocalizationTranslator.php 898e06e04e first commit преди 2 години
README.md 898e06e04e first commit преди 2 години
TranslatableMessage.php 898e06e04e first commit преди 2 години
Translator.php 898e06e04e first commit преди 2 години
TranslatorBag.php 898e06e04e first commit преди 2 години
TranslatorBagInterface.php 898e06e04e first commit преди 2 години
composer.json 898e06e04e first commit преди 2 години

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.1 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