Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XLIFF gererator trgLang matches srcLang #210

Open
ScottAustin opened this issue Jun 20, 2019 · 2 comments
Open

XLIFF gererator trgLang matches srcLang #210

ScottAustin opened this issue Jun 20, 2019 · 2 comments

Comments

@ScottAustin
Copy link

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

@oscarotero
Copy link
Member

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?

@ScottAustin
Copy link
Author

I'm happy to work on the PR for this.

Adding the data to the headers sounds like a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants