Open ScottAustin opened 5 years ago
Ok, seems good.
My only concern is how to keep this info in both way: load a xliff, export to Po, load the Po, export to xliff.
Maybe we could save the value in a header, like X-Source-Language
(not sure if there's a standard header name for this), so this value is present in any other format with headers. What do you think?
If you're ok with that, do you want to work in a PR?
I'm happy to work on the PR for this.
Adding the data to the headers sounds like a good idea.
Hi,
When generating XLIFF the Translations language is used as the srcLang & trgLang. the spec states "Target language - the code of the language, in which the Translated text is expressed".
It could be fixed by adding the target language to the options array.
$xliff->setAttribute('trgLang', $options['targetLanguage'] ?? $translations->getLanguage());
Any solution would be great