program for extracting xliff 1.2 from tagged html or injecting translations from xliff 1.2 into tagged html
C# Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
src
.gitignore
LICENSE
README.md
XliffForHtml.sln
environ

README.md

XliffForHtml

program for extracting xliff 1.2 from tagged html or injecting translations from xliff 1.2 into tagged html

Tagging

Elements in the HTML with text that needs to be translated must be tagged with either a data-i18n attribute or an i18n attribute. The attribute value is used as an id in a trans-unit element of the Xliff file. (If both attributes exist, the data-i18n value is used.) This approach to localizing an HTML file differs greatly from that suggested by the OASIS XLIFF 1.2 Representation Guide for HTML, but makes it easier to maintain the localization as the HTML file changes.

Note that attributes with text that needs to be translated cannot be handled by this program. Only text nodes can be translated. An effort is made to maintain inline markup, but that requires the translator to know how to handle the strange looking XML in the middle of the text data. How this is displayed to the user depends totally on the editing environment. The "maximalist" syntax suggested by OASIS is followed for these inline elements.