This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Translation
2020-05-15 09:32:03 +02:00
..
Catalogue Fix quotes in exception messages 2020-03-16 09:31:04 +01:00
Command [Translation] Add missing use statement 2020-02-04 08:22:30 +01:00
DataCollector Add missing use statement 2019-12-27 12:18:21 +01:00
DependencyInjection switched array() to [] 2019-01-16 10:39:14 +01:00
Dumper Use some PHP 5.4 constants unconditionally 2020-03-05 10:39:55 +01:00
Exception [Translation] added Base Exception for the component. 2016-09-21 18:16:56 +01:00
Extractor [Translation] fix return type declarations 2019-08-26 09:52:58 +02:00
Formatter switched array() to [] 2019-01-16 10:39:14 +01:00
Loader Fix exception messages containing exception messages 2020-05-04 17:12:51 +02:00
Reader Remove superfluous phpdoc tags 2019-08-14 13:59:53 +02:00
Resources [Config] Disable default alphabet sorting in glob function due of unstable sort 2019-10-30 13:43:22 +01:00
Tests embed resource name in error message 2020-05-15 09:32:03 +02:00
Util [Translation] Fixes typo in comment 2019-05-01 13:10:09 +02:00
Writer Add missing dots at the end of exception messages 2020-03-15 10:38:08 +01:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md Moved PhpExtractor and PhpStringTokenParser to Translation component 2017-09-29 01:37:07 +02:00
composer.json fix tests 2019-04-06 22:57:23 +02:00
DataCollectorTranslator.php [Translation] Collect original locale in case of fallback translation 2019-09-27 07:57:18 +02:00
IdentityTranslator.php switched array() to [] 2019-01-16 10:39:14 +01:00
Interval.php [Translation] added Base Exception for the component. 2016-09-21 18:16:56 +01:00
LICENSE Update year in license files 2020-01-01 12:03:25 +01:00
LoggingTranslator.php Remove superfluous phpdoc tags 2019-08-14 13:59:53 +02:00
MessageCatalogue.php Add missing dots at the end of exception messages 2020-03-15 10:38:08 +01:00
MessageCatalogueInterface.php fixed CS 2018-05-16 14:49:49 +02:00
MessageSelector.php switched array() to [] 2019-01-16 10:39:14 +01:00
MetadataAwareInterface.php Fix doc blocks 2014-04-18 22:17:16 +02:00
phpunit.xml.dist Bump phpunit XSD version to 5.2 2018-11-11 12:18:13 +01:00
PluralizationRules.php switched array() to [] 2019-01-16 10:39:14 +01:00
README.md [Translation][Debug] Add installation and minimal example to README 2020-02-03 16:10:40 +01:00
Translator.php embed resource name in error message 2020-05-15 09:32:03 +02:00
TranslatorBagInterface.php Adding use statement for InvalidArgumentException 2017-03-03 07:24:16 -08:00
TranslatorInterface.php switched array() to [] 2019-01-16 10:39:14 +01:00

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