'Replace comma by dot in Datatable MVC

    var categories_table = 1;
    $(document).ready(function () {
        $.fn.dataTable.moment(lang == "en" ? 'DD/MM/YYYY' : 'DD.MM.YYYY');
        categories_table = $('.datatable').DataTable({
            order: [[1, 'desc']],
            language: datatable_lang,
            dom: 'Bfrtip',
            buttons: [
                {
                    extend: 'collection',
                    autoClose: 'true',
                    text: '<i class="download icon">',
                    tag: 'span',
                    buttons: ['csv', 'print', 'excel']
                }
            ]
        });
        $('.ui.dropdown').dropdown();
        $('.statusType').click(function (event) {
            categories_table.search(this.textContent).draw();
        });
    
    });
if (lang == 'tr') {
    datatable_lang =
    {
        "sDecimal": ",",
        "sEmptyTable": "Tabloda herhangi bir veri mevcut değil",
        "sInfo": "_TOTAL_ kayıt",
        "sInfoEmpty": "Kayıt yok",
        "sInfoFiltered": "(_MAX_ kayıt içerisinden bulunan)",
        "sInfoPostFix": "",
        "sInfoThousands": ".",
        "sLengthMenu": "_MENU_",
        "sLoadingRecords": "Yükleniyor...",
        "sProcessing": "İşleniyor...",
        "sSearch": "",
        "sSearchPlaceholder": "Arama",
        "sZeroRecords": "Eşleşen kayıt bulunamadı",
        "oPaginate": {
            "sFirst": "İlk",
            "sLast": "Son",
            "sNext": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'><g transform='translate(-9 -6)'><path d='M6,4.586,10.293.293a1,1,0,0,1,1.414,1.414l-5,5a1,1,0,0,1-1.414,0l-5-5A1,1,0,0,1,1.707.293Z' transform='translate(9 18) rotate(-90)'/></g></svg>",
            "sPrevious": "<svg xmlns='http://www.w3.org/2000/svg'viewBox='0 0 7 12'><g transform='translate(-8 -6)'><path d='M2.414,6l4.293,4.293a1,1,0,1,1-1.414,1.414l-5-5a1,1,0,0,1,0-1.414l5-5A1,1,0,0,1,6.707,1.707Z' transform='translate(8 6)'/></g></svg>"
        },
        "oAria": {
            "sSortAscending": ": artan sütun sıralamasını aktifleştir",
            "sSortDescending": ": azalan sütun sıralamasını aktifleştir"
        },
        "select": {
            "rows": {
                "_": "%d kayıt seçildi",
                "0": "",
                "1": "1 kayıt seçildi"
            }
        }
    }
} else {
    datatable_lang =
    {
        "sEmptyTable": "No data available in table",
        "sInfo": "_TOTAL_ entries",
        "sInfoEmpty": "0 entries",
        "sInfoFiltered": "(filtered from _MAX_ total entries)",
        "sInfoPostFix": "",
        "sInfoThousands": ",",
        "sLengthMenu": "_MENU_",
        "sLoadingRecords": "Loading...",
        "sProcessing": "Processing...",
        "sSearch": "",
        "sZeroRecords": "No matching records found",
        "oPaginate": {
            "sFirst": "First",
            "sLast": "Last",
            "sNext": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'><g transform='translate(-9 -6)'><path d='M6,4.586,10.293.293a1,1,0,0,1,1.414,1.414l-5,5a1,1,0,0,1-1.414,0l-5-5A1,1,0,0,1,1.707.293Z' transform='translate(9 18) rotate(-90)'/></g></svg>",
            "sPrevious": "<svg xmlns='http://www.w3.org/2000/svg'viewBox='0 0 7 12'><g transform='translate(-8 -6)'><path d='M2.414,6l4.293,4.293a1,1,0,1,1-1.414,1.414l-5-5a1,1,0,0,1,0-1.414l5-5A1,1,0,0,1,6.707,1.707Z' transform='translate(8 6)'/></g></svg>"
        },
        "oAria": {
            "sSortAscending": ": activate to sort column ascending",
            "sSortDescending": ": activate to sort column descending"
        }
    }
}

I'm making dots where decimal and thousands are written here, but the commas in my table do not change. When they are tr, they become commas. When there is an en, it becomes a dot. I want a dot in both of them. When I change it in the language section, it does not change in decimal. Why do you think it might be?Do you have any other suggestions? Sorry For my English :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source