Problem with internalization

Problem with internalization

Leo BrunoLeo Bruno Posts: 19Questions: 3Answers: 0

Hi:

I´m using DataTable 1.10.25 and having issues with internationalization.

I don´t know what is wrong, but it doesn´t work.

async componentDidMount() {
    await this.doGetRecords()      
    this.$el = $(this.el);        
    this.$el.DataTable({
        "language": {"url": "https://cdn.datatables.net/plug-ins/1.10.25/i18n/Portuguese-Brasil.json"},
        "rowReorder": true,
        "responsive": true,
        "order": [[ 1, "asc" ]],
        "columnDefs": [                
            { 
                orderable: false, 
                className: 'reorder', 
                targets: 0 
            },
            {
                className: "text-right", 
                targets: [1] 
            }
        ]           
    });
}

Replies

  • kthorngrenkthorngren Posts: 21,443Questions: 26Answers: 4,974

    Your code snippet seems to work here:
    http://live.datatables.net/wucamepi/1/edit

    Note: rowreorder doesn't work properly as it is not setup properly in the test case.

    Do you get any errors?

    Can you provide a link to your page or a test case replicating the issue so we can help debug?

    Kevin

  • Leo BrunoLeo Bruno Posts: 19Questions: 3Answers: 0

    No errors.

    This is a react js test project.

    It doesn´t make sense,

    I can provide a link to a zip file.

    https://drive.google.com/drive/folders/1_0HkcBOttnWkqoFVFghyCue0DE7wEpPP?usp=sharing

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I don´t know what is wrong, but it doesn´t work.

    It what way doesn't it work? As Kevin said, we're happy to debug if you link to your page. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • Leo BrunoLeo Bruno Posts: 19Questions: 3Answers: 0

    Hi Colin, it worked loading from a local file.

    I would like to thank you guys for taking your time replying my messages.

Sign In or Register to comment.