1.1.6 • Published 27 days ago

@ni/xliff-to-json-converter v1.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
27 days ago

XLIFF to JSON Converter for Angular

The @ni/xliff-to-json-converter library converts XLIFF translation files to Angular's JSON format so that they can be loaded at runtime in Angular apps.

Usage

  1. Install in your Angular app's devDependencies:

    npm install -D @ni/xliff-to-json-converter
  2. Add scripts to your app's package.json to convert translated XLIFF files to JSON.

    "scripts": {
        "i18n:convert": "npm run i18n:convert:de && npm run i18n:convert:ja && npm run i18n:convert:zh",
        "i18n:convert:de": "xliff-to-json-converter --source src/locales/messages.de.xlf --destination src/locales/messages.de.json",
        "i18n:convert:ja": "xliff-to-json-converter --source src/locales/messages.ja.xlf --destination src/locales/messages.ja.json",
        "i18n:convert:zh": "xliff-to-json-converter --source src/locales/messages.zh.xlf --destination src/locales/messages.zh.json",
    },
  3. Ensure those converted files are generated at build time and not checked in to source.

Context

NI employees can see more info about our recommended Angular localization toolchain in the NI internal wiki.

Contributing

See CONTRIBUTING.md for instructions to make changes to the library.

Acknowledgements

This library is forked from talque/xliff-to-angular-json with additions including auto-testing, linting, and some small functionality changes. Thanks to its main contributor vbraun for the starting point!

1.1.6

27 days ago

1.1.5

2 months ago

1.1.4

3 months ago

1.1.3

4 months ago

1.1.2

7 months ago

1.1.1

1 year ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago