File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,18 @@ var i18n = new Translator(translations);
2727console .log (i18n .gettext (' hello world' )); // ola mundo
2828```
2929
30+ ## Sprintf
31+
32+ This library includes [ sprintf] ( https://github.com/alexei/sprintf.js ) dependency implemented in the short methods:
33+
34+ ``` js
35+ i18n .__ (' Hello %s' , ' world' ); // Hello world
36+ i18n .n__ (' One comment' , ' %s comments' , 12 , 12 ); // 12 comments
37+ ```
38+
3039## API
3140
32- method | short | description
41+ Long method | Short + sprintf | description
3342------ | ----- | -----------
3443gettext | __ | Returns a translation
3544ngettext | n__ | Returns a translation with singular/plural variations
@@ -39,12 +48,3 @@ pgettext | p__ | Returns a translation with a specific context
3948dgettext | d__ | Returns a translation with a specific domain
4049dpgettext | dp__ | Returns a translation with a specific domain and context
4150dnpgettext | dnp__ | Returns a translation with a specific domain, context and singular/plural variations
42-
43- ## Sprintf
44-
45- This library includes [ sprintf] ( https://github.com/alexei/sprintf.js ) dependency implemented in the short methods:
46-
47- ``` js
48- i18n .__ (' Hello %s' , ' world' ); // Hello world
49- i18n .n__ (' One comment' , ' %s comments' , 12 , 12 ); // 12 comments
50- ```
You can’t perform that action at this time.
0 commit comments