X\choro 48f1b97cc3 first commit пре 1 година
..
Catalogue 48f1b97cc3 first commit пре 1 година
Command 48f1b97cc3 first commit пре 1 година
DataCollector 48f1b97cc3 first commit пре 1 година
DependencyInjection 48f1b97cc3 first commit пре 1 година
Dumper 48f1b97cc3 first commit пре 1 година
Exception 48f1b97cc3 first commit пре 1 година
Extractor 48f1b97cc3 first commit пре 1 година
Formatter 48f1b97cc3 first commit пре 1 година
Loader 48f1b97cc3 first commit пре 1 година
Provider 48f1b97cc3 first commit пре 1 година
Reader 48f1b97cc3 first commit пре 1 година
Resources 48f1b97cc3 first commit пре 1 година
Test 48f1b97cc3 first commit пре 1 година
Util 48f1b97cc3 first commit пре 1 година
Writer 48f1b97cc3 first commit пре 1 година
CHANGELOG.md 48f1b97cc3 first commit пре 1 година
CatalogueMetadataAwareInterface.php 48f1b97cc3 first commit пре 1 година
DataCollectorTranslator.php 48f1b97cc3 first commit пре 1 година
IdentityTranslator.php 48f1b97cc3 first commit пре 1 година
LICENSE 48f1b97cc3 first commit пре 1 година
LocaleSwitcher.php 48f1b97cc3 first commit пре 1 година
LoggingTranslator.php 48f1b97cc3 first commit пре 1 година
MessageCatalogue.php 48f1b97cc3 first commit пре 1 година
MessageCatalogueInterface.php 48f1b97cc3 first commit пре 1 година
MetadataAwareInterface.php 48f1b97cc3 first commit пре 1 година
PseudoLocalizationTranslator.php 48f1b97cc3 first commit пре 1 година
README.md 48f1b97cc3 first commit пре 1 година
TranslatableMessage.php 48f1b97cc3 first commit пре 1 година
Translator.php 48f1b97cc3 first commit пре 1 година
TranslatorBag.php 48f1b97cc3 first commit пре 1 година
TranslatorBagInterface.php 48f1b97cc3 first commit пре 1 година
composer.json 48f1b97cc3 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

Help Symfony by sponsoring its development!

Resources