Q.Text Class
Module for loading text from files. Used for translations, A/B testing and more.
Constructor
Q.Text
()
Item Index
Methods
- get static
- set static
- setLanguage static
Methods
get
(
Boolean | Q.Request
static
-
name
-
callback
-
[options]
Get the text from a specific text source or sources.
Parameters:
-
name
String | ArrayThe name of the text source. Can be an array, in which case the text sources are merged in the order they are named there.
-
callback
FunctionReceives (err, content), may be called sync or async, where content is an Object formed by merging all the named text sources.
-
[options]
Object optionalOptions to use for Q.request . May also include:
set
(
static
-
name
-
content
-
[merges=false]
Sets the text for a specific text source.