Translate javascript:sortList

Discussion in 'JavaScript' started by afonseca, Nov 16, 2006.

  1. #1
    Hi all

    I need help.
    I have a little code that prints a menu with a list of options to order results:

    Order by: Title
    Author
    Date
    ...

    The code is this:

    ----------------------------------------------------------------
    </td><td align="right"><span class="default">Order by: </span>
    <select class="default" name="order_by" onchange="javascript:sortList(this.form, 'order_by');">
    {html_options options=$order_by_list selected=$order_by_default}
    </select>
    ----------------------------------------------------------------

    I can't rename the database, so I need a simple way to pick the variable and translate it to Portuguese and print
    instead of the english name.
    In other words, how can I translate the variables in order to get a result like this:



    Order by: Titulo
    Autor
    Data
    ...


    Tanks in advance
    António
     
    afonseca, Nov 16, 2006 IP