# new i18n(coreObj) → {Server.Modules.i18n}
This is the i18n Module of the Blackrock Application Server. It provides industry standard internationalisation and localisation support.
Name | Type | Description |
---|---|---|
coreObj |
Server.Modules.Core | The Core Module Singleton |
- Copyright:
- Copyright (c) 2021 Darren Smith
- License:
- Licensed under the LGPL license.
- Source:
module - The i18n Module Singleton
- Type
- Server.Modules.i18n
Tbc...
Extends
Methods
# (static) addResource(lng, ns, key, value, options) → {*}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
ns |
string | Namespace |
key |
string | Translation Key |
value |
string | Translation Value (for this key) |
options |
object | Options Object |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) addResourceBundle(lng, ns, resources, deep, overwrite) → {*}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
ns |
string | Namespace |
resources |
array | Array of Resources |
deep |
boolean | To be defined |
overwrite |
boolean | To be defined |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) addResources(lng, ns, resources) → {*}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
ns |
string | Namespace |
resources |
array | Array of Resources |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) changeLanguage(lng, callback) → {*}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language to Change To |
callback |
function | Callback Function |
- Source:
output - True for Success, False for Failure
- Type
- *
Tbc...
# (static) cloneInstance(options) → {object}
Tbc...
Name | Type | Description |
---|---|---|
options |
object | Options Object |
- Source:
t - Translation App Object
- Type
- object
Tbc...
# (static) createAppInstances(apps, cb)
Creates an i18n translation instance for each of the specified Blackrock apps
Name | Type | Description |
---|---|---|
apps |
array | Array of App Names |
cb |
function | Callback Function |
- Source:
Tbc...
# (static) createInstance(options, callback) → {object}
Tbc...
Name | Type | Description |
---|---|---|
options |
object | Options Object |
callback |
function | Callback Function |
- Source:
t - Translation App Object
- Type
- object
Tbc...
# (static) dir(lng) → {*}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) exists(key, options) → {*}
Tbc...
Name | Type | Description |
---|---|---|
key |
string | Translation Lookup Key |
options |
object | Options Object |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) format(data, format, lng) → {*}
Tbc...
Name | Type | Description |
---|---|---|
data |
* | To be defined |
format |
* | To be defined |
lng |
string | Language |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) getDataByLanguage(lng) → {*}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
- Source:
data - To be Defined
- Type
- *
Tbc...
# (static) getFixedT(lng, ns) → {*}
Tbc...
Name | Type | Description |
---|---|---|
lng |
* | To be defined |
ns |
* | To be defined |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) getResource(lng, ns, key, options) → {object}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
ns |
string | Namespace |
key |
string | Translation Key |
options |
object | Options Object |
- Source:
resource - Resource Object
- Type
- object
Tbc...
# (static) getResourceBundle(lng, ns) → {object}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
ns |
string | Namespace |
- Source:
resourceBundle - Requested Resource Bundle
- Type
- object
Tbc...
# (static) hasResourceBundle(lng, ns) → {boolean}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
ns |
string | Namespace |
- Source:
result - True if the namespace has the specified language, else False
- Type
- boolean
Tbc...
# (static) init(options, callback) → {function}
Tbc...
Name | Type | Description |
---|---|---|
options |
object | Options Object |
callback |
function | Callback Function |
- Source:
t - The t Function
- Type
- function
Tbc...
# (static) loadLanguages(lngs, callback) → {*}
Tbc...
Name | Type | Description |
---|---|---|
lngs |
string | array | Namespace(s) to Load |
callback |
function | Callback Function |
- Source:
output - True for Success, False for Failure
- Type
- *
Tbc...
# (static) loadNamespaces(ns, callback) → {*}
Tbc...
Name | Type | Description |
---|---|---|
ns |
string | array | Namespace(s) to Load |
callback |
function | Callback Function |
- Source:
output - True for Success, False for Failure
- Type
- *
Tbc...
# (static) off(name, myFn) → {*}
Tbc...
Name | Type | Description |
---|---|---|
name |
string | Event Name |
myFn |
function | Function to Remove Listener From |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) on(name, myFn) → {*}
Tbc...
Name | Type | Description |
---|---|---|
name |
string | Event Name |
myFn |
function | Function to Execute |
- Source:
output - To be defined
- Type
- *
Tbc...
# (static) reloadResources() → {*}
Tbc...
- Source:
output - True for Success, False for Failure
- Type
- *
Tbc...
# (static) removeResourceBundle(lng, ns) → {boolean}
Tbc...
Name | Type | Description |
---|---|---|
lng |
string | Language |
ns |
string | Namespace |
- Source:
result - True if Successful, else False
- Type
- boolean
Tbc...
# (static) setDefaultNamespace(ns) → {*}
Tbc...
Name | Type | Description |
---|---|---|
ns |
string | Namespace to Set as Default |
- Source:
output - True for Success, False for Failure
- Type
- *
Tbc...
# (static) t(key) → {string}
Tbc...
Name | Type | Description |
---|---|---|
key |
string | Lookup Key for Translation |
- Source:
translation - The translated text
- Type
- string
Tbc...
# (static) use(module) → {*}
Tbc...
Name | Type | Description |
---|---|---|
module |
* | To be defined |
- Source:
output - To be defined
- Type
- *
Tbc...