Skip to content
The Translation component provides tools to internationalize your application.
PHP
Branch: master
Clone or download
fabpot feature #35373 [Translation] Support name attribute on the xliff2 tra…
…nslator loader (Taluu)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[Translation] Support name attribute on the xliff2 translator loader

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #32048
| License       | MIT
| Doc PR        | not done yet

Support using the `name` attribute on the `unit` element in xliff 2.0 to use as the "translation key" rather than always relying on the `<source>` content, as was done on the xliff 1.2.

Commits
-------

37b31149c6 Support name attribute on the xliff2 translator loader
Latest commit b40717f Feb 9, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Catalogue [5.0] [Translator] Add parameter type-hints where possible Jul 5, 2019
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' Sep 3, 2019
Loader Support name attribute on the xliff2 translator loader Jan 20, 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 [5.0] [Translator] Add parameter type-hints where possible Jul 5, 2019
Writer Merge branch '4.4' Aug 8, 2019
.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 Add parameter type declarations to contracts. Nov 9, 2019
IdentityTranslator.php [Translation] remove deprecated code paths Jun 7, 2019
LICENSE Update year in license files Jan 1, 2020
LoggingTranslator.php Add parameter type declarations to contracts. Nov 9, 2019
MessageCatalogue.php
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 Merge branch '5.0' Nov 21, 2019
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.