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.1'
* 5.1:
  Fix abstract method name in PHP doc block
  Various cleanups
  [HttpClient] fix issues in tests
  Fixes sprintf(): Too few arguments in form transformer
  [Console] Fix QuestionHelper::disableStty()
  [Validator] Use Mime component to determine mime type for file validator
  validate subforms in all validation groups
  Update Hungarian translations
  Add meaningful message when Process is not installed (ProcessHelper)
  [Messenger] Change the default notify timeout value for PostgreSQL
  [PropertyAccess] Fix TypeError parsing again.
  [TwigBridge] fix fallback html-to-txt body converter
  [Security/Http] fix merge
  [ErrorHandler] fix setting $trace to null in FatalError
  [Form] add missing Czech validators translation
  [Validator] add missing Czech translations
  never directly validate Existence (Required/Optional) constraints
Latest commit 9d6d259 May 30, 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 May 30, 2020
Loader Merge branch '5.0' into 5.1 May 30, 2020
Reader Merge branch '4.4' Aug 8, 2019
Resources bump icu 67.1 May 19, 2020
Tests Merge branch '5.0' May 16, 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 missing gitattributes for phpunit-bridge Mar 27, 2020
.gitignore Added missing files .gitignore Jul 21, 2013
CHANGELOG.md Support name attribute on the xliff2 translator loader Jan 20, 2020
DataCollectorTranslator.php [HttpKernel] allow cache warmers to add to the list of preloaded clas… Apr 4, 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 May 4, 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 '5.0' May 16, 2020
TranslatorBagInterface.php [5.0] [Translator] Add parameter type-hints where possible Jul 5, 2019
composer.json Merge branch '5.1' May 20, 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.