Skip to content
The Translation component provides tools to internationalize your application.
PHP
Branch: master
Clone or download

Latest commit

nicolas-grekas Merge branch '5.0'
* 5.0:
  [DI] Fix CheckTypeDeclarationPass
  [Security/Http] don't require the session to be started when tracking its id
  [DI] fix preloading script generation
Latest commit 6dd2b97 Mar 18, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Catalogue Merge branch '4.4' into 5.0 Mar 16, 2020
Command Merge branch '4.4' into 5.0 Feb 4, 2020
DataCollector Merge branch '4.4' into 5.0 Dec 28, 2019
DependencyInjection [Translation] Bump dependencies and apply upstream parameter types. Aug 15, 2019
Dumper Merge branch '4.4' into 5.0 Jan 21, 2020
Exception Mark ExceptionInterfaces throwable Aug 29, 2018
Extractor Merge branch '4.4' Oct 7, 2019
Formatter Merge branch '4.4' into 5.0 Mar 18, 2020
Loader Merge branch '5.0' Mar 15, 2020
Reader Merge branch '4.4' Aug 8, 2019
Resources Merge branch '3.4' into 4.3 Oct 30, 2019
Tests feature #35373 [Translation] Support name attribute on the xliff2 tra… Feb 9, 2020
Util Merge branch '4.4' into 5.0 Mar 15, 2020
Writer Merge branch '4.4' into 5.0 Mar 15, 2020
.gitattributes Add .gitignore to .gitattributes Oct 12, 2019
.gitignore Added missing files .gitignore Jul 21, 2013
CHANGELOG.md Support name attribute on the xliff2 translator loader Jan 20, 2020
DataCollectorTranslator.php Leverage PHP8's get_debug_type() Mar 16, 2020
IdentityTranslator.php [Translation] remove deprecated code paths Jun 7, 2019
LICENSE Update year in license files Jan 1, 2020
LoggingTranslator.php Leverage PHP8's get_debug_type() Mar 16, 2020
MessageCatalogue.php Merge branch '4.4' into 5.0 Mar 15, 2020
MessageCatalogueInterface.php [5.0] [Translator] Add parameter type-hints where possible Jul 5, 2019
MetadataAwareInterface.php [5.0] [Translator] Add parameter type-hints where possible Jul 5, 2019
README.md [Translation][Debug] Add installation and minimal example to README Feb 3, 2020
Translator.php Merge branch '4.4' into 5.0 Dec 28, 2019
TranslatorBagInterface.php [5.0] [Translator] Add parameter type-hints where possible Jul 5, 2019
composer.json Leverage PHP8's get_debug_type() Mar 16, 2020
phpunit.xml.dist Bump phpunit XSD version to 5.2 Nov 11, 2018

README.md

Translation Component

The Translation component provides tools to internationalize your application.

Getting Started

$ composer require symfony/translation
use Symfony\Component\Translation\Translator;

$translator = new Translator('fr_FR');
$translator->addResource('array', [
    'Hello World!' => 'Bonjour !',
], 'fr_FR');

echo $translator->trans('Hello World!'); // outputs « Bonjour ! »

Resources

You can’t perform that action at this time.