xliff-loader
Loads an Xliff file in Webpack and outputs an object where `resname`s are keys and `target`s are values.
Last updated a year ago by ntarelix .
MIT · Original npm · Tarball · package.json
$ cnpm install xliff-loader 
SYNC missed versions from official npm registry.

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"
}

Current Tags

  • 1.0.1                                ...           latest (a year ago)

2 Versions

  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |