@billogram/lang
v1.2.0
Published
> Functions for handling copy
Downloads
33
Keywords
Readme
@billogram/lang
Functions for handling copy
Install
yarn add @billogram/lang
Usage
import {
fakenpgettext,
gettext,
interpolate,
npgettext,
pgettext,
} from "@billogram/lang";
See types for exported types.
gettext
gettext('Hello');
gettext('Hello %(name)s', { name: 'James' });
pgettext
pgettext('Greeting', 'Hello');
pgettext('Greeting', 'Hello %(name)s', { name: 'James' });
interpolate
interpolate('Hello %(name)s', { name: 'James' });
Note
This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. We probably won't take your feature requests unless they align with our own needs.
License
MIT