Localize Settings Global

Localize Settings Global

walter.iermano@live.comwalter.iermano@live.com Posts: 5Questions: 3Answers: 0
edited July 2021 in General

Good morning
I have an MVC project where the user can select the language of the user interface
for the supported languages I have created a file /json/datatables.hardware
every time I open a table I do this

var tmpDataTables = $ ("# tblData"). DataTable ({
      "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
      language: {
          url: '/json/datatables. Harrap.json'
      },

and everything works fine

but I would like to centralize everything and set it only when the program starts or when the user changes language
I read that global changes can be done like this

$ .extend (true, $ .fn.dataTable.defaults, {

but I didn't understand when and where to do it

Answers

Sign In or Register to comment.