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

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