Change language datatable editor

Change language datatable editor

HoganinouHoganinou Posts: 1Questions: 1Answers: 0
edited July 15 in General

Hello,
In which file should we insert the commands to translate and perform options actions?
table.mytable.js? I started with the editor.

(function($){

$(document).ready(function() {
    var editor = new $.fn.dataTable.Editor( {
        ajax: 'php/table.crypto_49.php',
        table: '#crypto_49',
        fields: [
            {
                "label": "Date:",
                "name": "date",
                "type": "datetime",
                "format": "YYYY-MM-DD HH:mm:ss"
            },
            {
                "label": "Portefeuille:",
                "name": "portefeuille"
            },
            {
                "label": "Plateforme:",
                "name": "plateforme",
                "def": "BINANCE"
            },
            {
                "label": "Nom coin:",
                "name": "nom_coin"
            },
            {
                "label": "VS coin:",
                "name": "vs_coin"
            },
            {
                "label": "Qty Achat:",
                "name": "qty_achat"
            },
            {
                "label": "Px Achat:",
                "name": "px_achat"
            }
        ]
        
    } );

    var table = $('#crypto_49').DataTable( {
        ajax: 'php/table.crypto_49.php',
        columns: [
            {
                "data": "date"
            },
            {
                "data": "portefeuille"
            },
            {
                "data": "plateforme"
            },
            {
                "data": "nom_coin"
            },
            {
                "data": "vs_coin"
            },
            {
                "data": "qty_achat"
            },
            {
                "data": "px_achat"
            },
            {
                "data": "total_achat"
            },
            {
                "data": "px_live"
            },
            {
                "data": "ratio"
            },
            {
                "data": "actif"
            },
            {
                "data": "profit"
            }
        ],
        select: true,
        lengthChange: false
    } );

    new $.fn.dataTable.Buttons( table, [
        { extend: "create", editor: editor },
        { extend: "edit",   editor: editor },
        { extend: "remove", editor: editor }
    ] );

    
    table.buttons().container()
        .appendTo( $('.col-md-6:eq(0)', table.table().container() ) );
} );


}(jQuery));* 

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

Sign In or Register to comment.