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-10-28 21:42:29 +01:00
..
Catalogue Merge branch '3.4' into 4.4 2020-03-16 09:56:54 +01:00
Command Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
DataCollector Merge branch '4.3' into 4.4 2019-12-28 16:00:14 +01:00
DependencyInjection Use short array deconstruction syntax. 2020-10-28 21:42:29 +01:00
Dumper Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
Exception Mark ExceptionInterfaces throwable 2018-08-29 17:58:00 +02:00
Extractor [4.4] Ignore more deprecations for Mockery mocks 2020-10-02 09:34:48 +02:00
Formatter Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
Loader Use short array deconstruction syntax. 2020-10-28 21:42:29 +01:00
Reader Remove superfluous phpdoc tags 2019-08-14 13:59:53 +02:00
Resources Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
Tests [Translator] Make sure a null locale is handled properly 2020-09-18 10:46:47 +02:00
Util Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
Writer Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
.gitattributes add missing gitattributes for phpunit-bridge 2020-03-27 17:54:36 +01:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md Deprecate things that prevent \Throwable from bubbling down 2019-11-05 18:23:20 +01:00
composer.json Merge branch '3.4' into 4.4 2020-10-24 13:50:19 +02:00
DataCollectorTranslator.php Fix quotes in exception messages 2020-03-16 12:24:17 +01:00
IdentityTranslator.php Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
Interval.php Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
LICENSE Update year in license files 2020-01-01 12:03:25 +01:00
LoggingTranslator.php Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
MessageCatalogue.php Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
MessageCatalogueInterface.php [Translation] make intl+icu format seamless by handling it in MessageCatalogue 2018-11-14 17:25:09 +01:00
MessageSelector.php Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02: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 Merge branch '3.4' into 4.4 2020-09-02 18:08:58 +02:00
README.md [Translation][Debug] Add installation and minimal example to README 2020-02-03 16:10:40 +01:00
Translator.php [Translator] Optional Intl dependency 2020-09-24 11:40:01 +02:00
TranslatorBagInterface.php Adding use statement for InvalidArgumentException 2017-03-03 07:24:16 -08:00
TranslatorInterface.php Merge branch '4.1' into 4.2 2019-01-16 21:31:39 +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