Hi,

my question is if there's a variable which the translation scripts are
setting, which contains the currently displayed language?

The following code does the job, but I can't tell how reliable this is
in terms of it's interface definition, ie if I can rely on the fact
that the structure and element id will always stay the same.

  function getLanguage() {
    result = document.getElementById(":
0.targetLanguage").getElementsByTagName("select");
    if (result.length == 1) {
      select = result[0];
      index = select.selectedIndex;
      alert(select[index].value + ':' + select[index].innerHTML);
    }
  }

If it's not reliable -- because the API developers choose to change
the generated HTML or element id's --, is there a variable which
contains that information which will have always the same name, that
is, over the course of about a year or more?

Best would be to have two variables, one with the nice name and and
one with the language id.

Regards,
Daniel

Reply via email to