@vandres/ngx-translate-extract-marker
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

ngx-translate-extract-marker

This is a fork of a great library by Kim Biesbjerg, but as far as I can tell the original library is unfortunately no longer being developed

Installation

$ npm install @vandres/ngx-translate-extract-marker

Mark strings for extraction using the marker function

If, for some reason, you want to extract strings not passed directly to ngx-translate/TranslateService's get(), instant() or stream() methods, you can wrap them in a custom marker function to let ngx-translate-extract know you want to extract them.

Import and use the marker function:

import { marker } from '@vandres/ngx-translate-extract-marker';

marker('Extract me', 'Giving optional context');

Or you can alias the marker() method:

import { marker as _ } from '@vandres/ngx-translate-extract-marker';

_('Extract me', 'Giving optional context');

Then run the extract script: $ ngx-translate-extract

ngx-translate-extract

See ngx-translate-extract and ngx-translate for more details.

Credits

Original library, idea and code: @biesbjerg/ngx-translate-extract-marker ❤️

Update to modern Angular: @colsen1991/ngx-translate-extract-marker

Package Sidebar

Install

npm i @vandres/ngx-translate-extract-marker

Weekly Downloads

32

Version

3.0.0

License

MIT

Unpacked Size

7.86 kB

Total Files

13

Last publish

Collaborators

  • vandres