Zory a30513060a frist 4 주 전
..
Catalogue a30513060a frist 4 주 전
Command a30513060a frist 4 주 전
DataCollector a30513060a frist 4 주 전
DependencyInjection a30513060a frist 4 주 전
Dumper a30513060a frist 4 주 전
Exception a30513060a frist 4 주 전
Extractor a30513060a frist 4 주 전
Formatter a30513060a frist 4 주 전
Loader a30513060a frist 4 주 전
Provider a30513060a frist 4 주 전
Reader a30513060a frist 4 주 전
Resources a30513060a frist 4 주 전
Test a30513060a frist 4 주 전
Util a30513060a frist 4 주 전
Writer a30513060a frist 4 주 전
CHANGELOG.md a30513060a frist 4 주 전
CatalogueMetadataAwareInterface.php a30513060a frist 4 주 전
DataCollectorTranslator.php a30513060a frist 4 주 전
IdentityTranslator.php a30513060a frist 4 주 전
LICENSE a30513060a frist 4 주 전
LocaleSwitcher.php a30513060a frist 4 주 전
LoggingTranslator.php a30513060a frist 4 주 전
MessageCatalogue.php a30513060a frist 4 주 전
MessageCatalogueInterface.php a30513060a frist 4 주 전
MetadataAwareInterface.php a30513060a frist 4 주 전
PseudoLocalizationTranslator.php a30513060a frist 4 주 전
README.md a30513060a frist 4 주 전
TranslatableMessage.php a30513060a frist 4 주 전
Translator.php a30513060a frist 4 주 전
TranslatorBag.php a30513060a frist 4 주 전
TranslatorBagInterface.php a30513060a frist 4 주 전
composer.json a30513060a frist 4 주 전

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