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

1.0.2 • Public • Published

Mark strings for extraction using a marker function

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

It's the fork of @biesbjerg/ngx-translate-extract-marker. In this version added string context and comment support feature.

Install marker function: npm install @shavenzov/ngx-translate-extract-marker

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

marker('Extract me');

Add the marker argument when running the extract script:

ngx-translate-extract ... --marker marker

You can alias the marker function if needed:

import { marker as $ } from '@shavenzov/ngx-translate-extract-marker';

$('Extract me');

//Extract string with specific content and comment to translator
$('Extract me', 'context', 'comment');

ngx-translate-extract ... --marker $

Package Sidebar

Install

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

Weekly Downloads

25

Version

1.0.2

License

MIT

Unpacked Size

10.7 kB

Total Files

20

Last publish

Collaborators

  • tenuj