WordPress.org

Ready to get started?Download WordPress

Forums

WP-Filebase Download Manager
[resolved] Changing language in DataTables (3 posts)

  1. phobophil
    Member
    Posted 1 year ago #

    Despite explanation i dont understand how to change the language of the table.

    http://datatables.net/plug-ins/i18n#German

    Where do i have to put the javascript code-snipped, at the end of "jquery.dataTables.js"? And what about the translation text file - in which folder? Are the curly brackets necessary?

    I'm totally left out in the dark, could you please help me out?

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

  2. phobophil
    Member
    Posted 1 year ago #

    With help from this thread I could change the language of the data table http://wordpress.org/support/topic/plugin-wp-filebase-download-manager-styling-the-output-in-a-table

    But I still cannot get the javascript running. I think I have to put this code to my header.php

    <script type="text/javascript" src="jquery.dataTables.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('#example').dataTable( {
                "oLanguage": {
                    "sUrl": "dataTables.german.txt"
                }
            } );
        } );
    </script>

    The text file "dataTables.german.txt" is placed in the root folder of my template (the header.php as well). Please help me, I feel like a DAU (luser).

  3. phobophil
    Member
    Posted 1 year ago #

    Still no success!

    I inserted the code into my header.php
    The "jquery.dataTables.js" is loaded. But the language doesn´t change at all. Now it looks like this:

    <script type="text/javascript" src="/wp-content/plugins/wp-filebase/extras/jquery/dataTables/js/jquery.dataTables.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
    	$('#example').dataTable( {
    	    "oLanguage": {
    		"sUrl": "/wp-content/plugins/wp-filebase/extras/jquery/dataTables/js/dataTables.german.txt"
    	    }
    	} );
        } );
    </script>

    What is wrong... the path?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.