Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | yes |
Symfony version | 3.2.7 |
I tried to convert my translation file from json
format to xliff
.
I used the following command translation:update en --output-format xliff
and got the following error:
[ERROR] Wrong output format
Supported formats are: php, xlf, po, mo, yml, ts, csv, ini, json, res.
I know xlf === xliff
but its annoying to refactor the extension.
I also found out that in the xliff
file the trans-unit
id
is a bit confusing (3b59784ea795cb0dccda26ec97f5f297)?
if you compare it to the best practise example. http://symfony.com/doc/current/best_practices/i18n.html
What I like in json
is that I can create path like this:
{
"acme": {
"entity": {
"keyword": "Keyword",
}
}
Having something like this in xliff would be awesome!
I could imagine something like this
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" target-language="en" datatype="plaintext" original="file.ext">
<body>
<group id="acme">
<group id="entity">
<trans-unit id="keyword">
<source>keyword</source>
<target>Keyword</target>
</trans-unit>
</group>
</group>
</body>
</file>
</xliff>