• Internationalization method. Uses Jodit.lang object

    Example

    var editor = Jodit.make("#redactor", {
    language: 'ru'
    });
    console.log(editor.i18n('Cancel')) //Отмена;

    Jodit.defaultOptions.language = 'ru';
    console.log(Jodit.prototype.i18n('Cancel')) //Отмена

    Jodit.lang.cs = {
    Cancel: 'Zrušit'
    };
    Jodit.defaultOptions.language = 'cs';
    console.log(Jodit.prototype.i18n('Cancel')) //Zrušit

    Jodit.lang.cs = {
    'Hello world': 'Hello \s Good \s'
    };
    Jodit.defaultOptions.language = 'cs';
    console.log(Jodit.prototype.i18n('Hello world', 'mr.Perkins', 'day')) //Hello mr.Perkins Good day

    Parameters

    • key: string
    • Optional params: (string | number)[]
    • Optional options: ILanguageOptions

    Returns string

Jodit PRO

If you like Jodit - try Jodit PRO