[public-i18n-geo] <none>

Richard,

Here is my question as promised  Let me know what we need to do next.

Regards, Russ

=-=-=-=-=-=-=-=-=
Question:  

As part of a form, I have a list of terms in a drop-down box.  Why are they not correctly sorted when I translate the items in the list?


Answer:

Although many programming languages have devices like drop-down boxes that have the capability of sorting a list of items before displaying them as part of their functionality.  The HTML <select> function has no such capabilities.  It will list the <options> in the order received.  Thus one must manually pre-sort their translated options before presenting them to the client.

For example, lets say we have a pull-down list for types of pets.  In the list, we have the following in alphabetical order:

<form .....>
   <select size="1" name="pet">
      <option> cat </option>
      <option> dog </option>
      <option> mouse </option>
   </select>
...
...
</form>

When this is translated to Dutch, the list becomes 

   <form .....>
   <select size="1" name="pet">
      <option> kat </option>
      <option> hond </option>
      <option> muis </option>
   </select>
...
...
</form>

But for it to be in correct Dutch alphabetical order we will need to re-arrange to list to:

   
   <form .....>
   <select size="1" name="pet">
      <option> hond</option>
      <option> kat </option>
      <option> muis </option>
   </select>
...
...
</form>

This must be done for each language to be displayed.

Received on Monday, 5 May 2003 16:43:05 UTC