So I have created this very neat translator with the language api. To
fill the optionboxes (for the form and to languages) I have the
following function:
function fillOptions()
{
var srcurl = document.getElementById('sl');
var dsturl = document.getElementById('tl');
var i=0;
for (l in google.language.Languages)
{
var lng = l.toLowerCase();
var lngCode = google.language.Languages[l];
if (google.language.isTranslatable(lngCode))
{
srcurl.options.add(new Option(lng, lngCode));
dsturl.options.add(new Option(lng, lngCode));
}
}
}
The thing is, this will show all the languages in english, but I want
them to show in dutch. I Thought that adding {"language":"nl"} to
google.load("language", "1"); (so it becomes google.load("language",
"1", {"language":"nl"}); would do the trick; it doesnt. My second
geuss was to add ?hl=nl to <script type="text/javascript" src="http://
www.google.com/jsapi"></script> (so it becomes <script type="text/
javascript" src="http://www.google.com/jsapi?hl=nl"></script>)
This didn't work either.
So I'm stuck. There must be a solution (other trant translating each
languagename ;-)) but I'm lost. Who can help me?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---