views:

101

answers:

1

Hi,

I'm trying to load a combo with an enumerator from Translation API. But, I don't know how to iterate and get both the key and value of each item and show it to the user. Can anyone tell me how to do this???

The object I'm trying to access is google.language.Languages. It is built this way:

google.language.Languages{
'AFRIKAANS' : 'af',  
'ALBANIAN' : 'sq',  
'AMHARIC' : 'am',  
'ARABIC' : 'ar',  
'ARMENIAN' : 'hy', 
....
}
+2  A: 
for(language in google.language.Languages)
{
    alert(google.language.Languages[language]);
}

?

Andrei Serdeliuc