German.json

German.json

MadMax76MadMax76 Posts: 149Questions: 33Answers: 1

Hi,
this file http://cdn.datatables.net/plug-ins/1.10.22/i18n/German.json
seems to be corrupt. I notices this because some expressions are displayed in german, others in english.
This is what I get displayed:

so this consists only of around 20 lines. By the way for french or dutch it is even less...

I made a copy for myself with the code from https://datatables.net/plug-ins/i18n/German.html, and here the json-answer is complete. nevertheless the editor-buttons still use english, whereas the search-field is german. I have made no changes to the button-text.

Thanks
Max

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Hi Max,

    Our CDN holds a snapshot of what the language files looked like at the time of release. Since the last release we've introduce a new language contribution tool which has massively increased the about of translations we receive - which is why you see such a big difference between the CDN and the plug-in page. As the page says:

    Additionally, the CDN holds the latest release, while the translation above includes the latest changes which may not yet have been released

    So the right thing to do, if you want the full list of translations is to host the file locally.

    Regarding Editor, its translations are slightly different from DataTables in that they do not (yet - they will soon!) use the information from that file. See this page for how to do translations with Editor.

    Regards,
    Allan

  • MadMax76MadMax76 Posts: 149Questions: 33Answers: 1

    I found a ready translation for german in a spanish conversation ;-) however, I am able to put this into one editor - but can I change this as default for all my datatables in a site?

    Thanks
    Max

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

    Yep, you can either use a file, or you can set individual strings,

    Colin

  • MadMax76MadMax76 Posts: 149Questions: 33Answers: 1

    HI Colin,
    i thought the "file"-version is only for datatables, but not for editor - or is that wrong?
    And setting individual strings means, I have to do this for ech editor, eve if I have 4 in just one html-page?
    Thanks
    Max

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Answer ✓

    You are right - Editor 1.x doesn’t support file loading for language strings. Colin is thinking of a feature I’ve added (and he’s been testing) for Editor 2 which will drop soon :) (it will be able to use strings defined in the file loaded by Editor).

    If you have multiple Editors on the page, your best option is to set default values for the init options - e.g.:

    $.extend( true, $.fn.dataTable.Editor.defaults.i18n, {
      close: ‘Close’,
      // ...
    });
    

    Allan

This discussion has been closed.