3.0.0 • Published 2 months ago

@vandres/ngx-translate-extract-marker v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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

3.0.0

2 months ago