getting parseerror with language.url

getting parseerror with language.url

jfrjfr Posts: 71Questions: 24Answers: 0
edited April 2015 in DataTables 1.10

Hi
I have installed jQuery 2.1.3 with Datatables 1.10.6

I get get an error,no it does not return a success and every thing stays English with

"language": {
    "url": "/DataTables-1.10.6/extensions/i18n/French.lang"
}
or
"language": {
    "url": "/DataTables-1.10.6/extensions/i18n/english.lang"
}

I have added a console.log in the $.ajax language function with give me

error parsererror
 response:
/**
 * French translation
 *  @name French
 *  @anchor French
 *  @author 
 */

{
    "sProcessing":     "Traitement en cours...",
    "sSearch":         "Rechercher :",
    "sLengthMenu":     "Afficher _MENU_ éléments",
    "sInfo":           "Affichage de l'élement _START_ à _END_ sur _TOTAL_ éléments",
    "sInfoEmpty":      "Affichage de l'élement 0 à 0 sur 0 éléments",
    "sInfoFiltered":   "(filtré de _MAX_ éléments au total)",
    "sInfoPostFix":    "",
    "sLoadingRecords": "Chargement en cours...",
    "sZeroRecords":    "Aucun élément à afficher",
    "sEmptyTable":     "Aucune donnée disponible dans le tableau",
    "oPaginate": {
        "sFirst":      "Premier",
        "sPrevious":   "Précédent",
        "sNext":       "Suivant",
        "sLast":       "Dernier"
    },
    "oAria": {
        "sSortAscending":  ": activer pour trier la colonne par ordre croissant",
        "sSortDescending": ": activer pour trier la colonne par ordre décroissant"
    }
}

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    You need to remove the documentation comment from the .lang file. It is a language file, and is not valid JSON with the comment since JSON does not support commenting.

    Allan

This discussion has been closed.