WordPress.org

Ready to get started?Download WordPress

Forums

WP-Filebase Download Manager
[resolved] Translate text above & below data-table? (4 posts)

  1. uddman
    Member
    Posted 1 year ago #

    Hi!
    Where do I translate the text above and below the data-table?
    (i.e. "Show ... entries", "Search", "Showing 1 to 3 of 3 entries", "Previous" and "Next".)
    See screenshot: https://dl.dropbox.com/u/8151015/How_do_I_translate_data_table_script.png

    I understood how to change the table header under Manage Templates / File list / Data-table, but it refers to "jquery-dataTables%" for the header, but when I search the document jquery.dataTables.js I can't find the words above.

    I also searched the .po-file but those words where not there.

    It seams the user "phobofil" has the same issue in this thread: http://wordpress.org/support/topic/changing-language-in-datatables?replies=3

    Please advice!
    Best regards
    Jonas Uddman

    http://wordpress.org/extend/plugins/wp-filebase/

  2. uddman
    Member
    Posted 1 year ago #

    Here is the solution which the author mailed me:
    Replace the footer template under WP Filebase/ Edit Templates, choose the 3rd tab "Lists" and edit Data-table. replace the footer code with this for Swedish (other languages can be found here: http://datatables.net/plug-ins/i18n):

    </tbody>
    </table>
    <script type="text/javascript" charset="utf-8">
        jQuery(document).ready(function() {
    jQuery('#wpfb-data-table-%uid%').dataTable({"oLanguage": {
      "sEmptyTable": "Tabellen innehåller ingen data",
      "sInfo": "Visar _START_ till _END_ av totalt _TOTAL_ rader",
      "sInfoEmpty": "Visar 0 till 0 av totalt 0 rader",
      "sInfoFiltered": "(filtrerade från totalt _MAX_ rader)",
      "sInfoPostFix": "",
      "sInfoThousands": ",",
      "sLengthMenu": "Visa _MENU_ rader",
      "sLoadingRecords": "Laddar...",
      "sProcessing": "Bearbetar...",
      "sSearch": "Sök:",
      "sZeroRecords": "Hittade inga matchande resultat",
      "oPaginate": {
        "sFirst": "Första",
        "sLast": "Sista",
        "sNext": "Nästa",
        "sPrevious": "Föregående"
      },
      "oAria": {
        "sSortAscending": ": aktivera för att sortera kolumnen i stigande ordning",
        "sSortDescending": ": aktivera för att sortera kolumnen i fallande ordning"
      }
    }
     });
    });
    </script>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum's parser.]

  3. piedro_
    Member
    Posted 1 year ago #

    thank you ;-)

    this worked perfectly.

    (only thing that is broken is that I can not change the number of items you show in the list. default is 10 but I can't seem to find a way to alter this. The shortcode inserter does not seem to work)

  4. piedro_
    Member
    Posted 1 year ago #

    but i fixed that by adding some code the bottom :

    </tbody>
    </table>
    <script type="text/javascript" charset="utf-8">
        jQuery(document).ready(function() {
    jQuery('#wpfb-data-table-%uid%').dataTable(
    
    {"oLanguage": {
      "sEmptyTable": "Lege Tabel",
      "sInfo": " _START_ tot _END_ van _TOTAL_ bestanden",
      "sInfoEmpty": "Toon 0 tot 0 van 0 bestanden",
      "sInfoFiltered": "(filtrerade från totalt _MAX_ rader)",
      "sInfoPostFix": "",
      "sInfoThousands": ",",
      "sLengthMenu": "Toon _MENU_ bestanden",
      "sLoadingRecords": "Laden",
      "sProcessing": "Verwerken",
      "sSearch": "Zoek:",
      "sZeroRecords": "Geen inhoud",
      "oPaginate": {
        "sFirst": "Eerste",
        "sLast": "Laatste",
        "sNext": "Volgende",
        "sPrevious": "Vorige"
      },
      "oAria": {
        "sSortAscending": ": Sorteer oplopen",
        "sSortDescending": ": Sorteer aflopend"
      }
      },
      "iDisplayLength": 50,
      "aLengthMenu": [ 50, 100 ]
      }
    
    );
    });
    </script>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic