SCEditor

_()

_(str, args) Since: 1.3.0

Translates a string into the language current used by the editor.

The strings {0}, {1}, {2}, ect. will be replaced with the arguments provided.

Syntax

instance._(str[, arg1[, arg2[, ...]]]);

Parameters

str
Type: String

The string to translate.

arg1, arg2, …
Type: String

Arguments to replace in the transalted string.

Return

Type: String

Example

Inserting text:

var textarea = ...;
var instance = sceditor.instance(textarea);

var boldTranslation = instance._('Bold');

// helloWorld will be "Hello World!" or the translated version
var helloWorld = instance._('Hello {0}!', 'World');