Skip to content
Bob edited this page Mar 11, 2015 · 3 revisions

If you are utilizing localization, or you just do not care for the default wording, you can pass a "langmap" object into the Isb constructor. This langmap will override the defaults and display the wording of your choice instead. The langmap object is shaped like this:

var langmap = {
    "equal": "Is equal to",
    "notequal": "<>",
    "startswith": "Starts with",
    "endswith": "Ends with",
    "istrue": "Is true",
    "isfalse": "Is false",
    "isnull": "Is Null",
    "isnotnull": "Is not null",
    "contains": "Contains",
    "greater": ">",
    "greatereq": ">=",
    "less": "<",
    "lesseq": "<=",
    "isin": "Is in",
    "isnotin": "Is not in",
    "defsrch": "Define Search",
    "reset": "Reset"
}

With the langmap constructed, pass it into the Isb constructor:

isb = new com.contrivedexample.isbjs.Isb({
    "divName" : "content",
    "ulName" : "srchUL",
    "langmap" : langmap
});

For instance, the following map...

var langmap = {
    "equal": "es igual a",
    "notequal": "no es igual a",
    "startswith": "comienza con",
    "endswith": "termina with",
    "istrue": "es cierto",
    "isfalse": "Is falso",
    "isnull": "es null",
    "isnotnull": "no es null",
    "contains": "contiene",
    "greater": "es mayor que",
    "greatereq": "es mayor o igual a",
    "less": "es menos de",
    "lesseq": "es menos o igual a",
    "isin": "está en",
    "isnotin": "no es en",
    "defsrch": "definir la búsqueda",
    "reset": "volver a empezar"
}

... will yeild this result:
Localization sample

Clone this wiki locally