var gt = new Gettext({
    "domain": "messages",
    "locale_data": json_locale_data
});

function gettext(msgid) {
    return gt.gettext(msgid);
}

function ngettext(msgid, msgid_plural, n) {
    return gt.ngettext(msgid, msgid_plural, n);
}

function pgettext(msgctxt, msgid) {
    return gt.pgettext(msgctxt, msgid);
}

function npgettext(msgctxt, msgid, msgid_plural, n) {
    return gt.npgettext(msgctxt, msgid, msgid_plural, n);
}

function strarg(str, val1, val2, val3, val4) {
    if (typeof(val1) != undefined) {
        str = str.replace('%1', val1);
    }
    if (typeof(val2) != undefined) {
        str = str.replace('%2', val2);
    }
    if (typeof(val3) != undefined) {
        str = str.replace('%3', val3);
    }
    if (typeof(val4) != undefined) {
        str = str.replace('%4', val4);
    }
    return str;
}

