wesmiler a41138daae wesmiler hace 1 año
..
Catalogue a41138daae wesmiler hace 1 año
Command a41138daae wesmiler hace 1 año
DataCollector a41138daae wesmiler hace 1 año
DependencyInjection a41138daae wesmiler hace 1 año
Dumper a41138daae wesmiler hace 1 año
Exception a41138daae wesmiler hace 1 año
Extractor a41138daae wesmiler hace 1 año
Formatter a41138daae wesmiler hace 1 año
Loader a41138daae wesmiler hace 1 año
Provider a41138daae wesmiler hace 1 año
Reader a41138daae wesmiler hace 1 año
Resources a41138daae wesmiler hace 1 año
Test a41138daae wesmiler hace 1 año
Util a41138daae wesmiler hace 1 año
Writer a41138daae wesmiler hace 1 año
CHANGELOG.md a41138daae wesmiler hace 1 año
DataCollectorTranslator.php a41138daae wesmiler hace 1 año
IdentityTranslator.php a41138daae wesmiler hace 1 año
LICENSE a41138daae wesmiler hace 1 año
LoggingTranslator.php a41138daae wesmiler hace 1 año
MessageCatalogue.php a41138daae wesmiler hace 1 año
MessageCatalogueInterface.php a41138daae wesmiler hace 1 año
MetadataAwareInterface.php a41138daae wesmiler hace 1 año
PseudoLocalizationTranslator.php a41138daae wesmiler hace 1 año
README.md a41138daae wesmiler hace 1 año
TranslatableMessage.php a41138daae wesmiler hace 1 año
Translator.php a41138daae wesmiler hace 1 año
TranslatorBag.php a41138daae wesmiler hace 1 año
TranslatorBagInterface.php a41138daae wesmiler hace 1 año
composer.json a41138daae wesmiler hace 1 año

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