xliff-loader

1.0.1 • Public • Published

Xliff Loader

Loads an Xliff file in Webpack and turns it into an object where resnames are keys and targets are values.

Example

./i18n.xlf

<xliff>
    <file>
        <body>
            <trans-unit id="appFooter" resname="appFooter">
                <source>This is the app footer text</source>
                <target>C'est le texte du bas de page de l'application</target>
            </trans-unit>
        </body>
    </file>
</xliff>

./a.js

const i18n = require('xliff-loader!./i18n.xlf');

Result

The following object is output

{
    "appFooter": "C'est le texte du bas de page de l'application"
}

Readme

Keywords

Package Sidebar

Install

npm i xliff-loader

Weekly Downloads

125

Version

1.0.1

License

MIT

Unpacked Size

7.22 kB

Total Files

12

Last publish

Collaborators

  • ntarelix