i18n - "x row selected" always shown in English - not being translated

i18n - "x row selected" always shown in English - not being translated

Dirk FincleyDirk Fincley Posts: 38Questions: 3Answers: 0
edited March 2016 in Free community support

The "x rows selected" message is coming out in English when I select rows even when I use all the i18n Spanish foreign language setting below and the "language construct below. Has the number of rows selected not been assigned a name or am I missing something? I do not see the number of rows selected option?

I see "Mostrando registros del 1 al 4 de un total de 4 registros 1 row selected".

I am guessing that the ".. rows selected" text has not been assigned a translated value?

    i18n: {
    "create": {
      "button":     "Neuvo",
      "title":      "Crear nueva entrada",
      "submit":     "Crear"
    },
    "edit": {
      "button":     "Modificar",
      "title":   "Modificar un ingreso",
      "submit":     "Modificar"
    },
    "remove": {
      "button":   "Eliminar",
      "title":      "Eliminar",
      "submit":   "Eliminar",
      "confirm": {
        _: "Está seguro de que quiere borrar la línea 1?",
        1: "Está seguro de que quiere borrar % d líneas ?"
      }
    },
    "error": {
      "system": "Se ha producido un error , póngase en contacto con el administrador del sistema"
    },
    "multi": {
      "title": "Varios valores",
      "info": "Los elementos seleccionados contienen valores diferentes para esta entrada . Para editar y mover todos los elementos para esta entrada por el mismo valor , haga clic o presione aquí , de lo contrario, conservarán sus valores individuales",
      "restore": "Cancelar cambios"
    },
    "datetime": {
      "previous":         'Anterior',
      "next":             'Primero',
      "months":        [ 'Enero' , 'Febrero', 'Julio' , 'Marzo' ,  'Abril', 'Mayo' , 'Junio' , ' Julio ' , 'Agosto', ' Septiembre ' ,  'Octubre' , ' Diciembre'],
      "weekdays":     [ 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado' ]
    }
},      

    "language": {
        "url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json"
    },      

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Answer ✓

    The selected rows language string is configured via the language.select.rows option which should be given in the DataTables constructor (see the examples on that reference page) and not in the Editor constructor.

    Allan

  • Dirk FincleyDirk Fincley Posts: 38Questions: 3Answers: 0

    Excellent. Worked a treat. Thanks!

This discussion has been closed.