
/* gettext library */

var catalog = new Array();

function pluralidx(count) { return (count == 1) ? 0 : 1; }
catalog['Are you sure you want to change tabs without saving the page first?'] = 'Sei sicuro di voler cambiare lingua senza salvare prima la pagina?';
catalog['Are you sure you want to delete this plugin?'] = 'Sei sicuro di voler cancellare questo plugin?';
catalog['Cerca pagina catalogo'] = 'Find page catalogue';
catalog['Cerca prodotti'] = 'Find product';
catalog['Errore inserimento prodotto'] = 'Error when adding product';
catalog['Not all plugins are saved. Are you sure you want to save the page? All unsaved plugin content will be lost.'] = 'Non tutti i plugin sono stati salvati.Sei sicuro di salvare la pagina?Tutti i plugin non salvati verranno persi.';
catalog['Prodotto inserito nel carrello'] = 'Product added to cart';
catalog['ricalcolo prodotti nel carrello ...'] = 'recalculation products in your cart ...';


function gettext(msgid) {
  var value = catalog[msgid];
  if (typeof(value) == 'undefined') {
    return msgid;
  } else {
    return (typeof(value) == 'string') ? value : value[0];
  }
}

function ngettext(singular, plural, count) {
  value = catalog[singular];
  if (typeof(value) == 'undefined') {
    return (count == 1) ? singular : plural;
  } else {
    return value[pluralidx(count)];
  }
}

function gettext_noop(msgid) { return msgid; }

function interpolate(fmt, obj, named) {
  if (named) {
    return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
  } else {
    return fmt.replace(/%s/g, function(match){return String(obj.shift())});
  }
}

