Question: I store, in a session variable, which language does user wants to translate but I don't know to pass it DataTables

I found [this explanation on the datatables website](http://datatables.net/examples/advanced_init/language_file.html) but that didn't really help, where do I set language param ?

Answer: 
You have to either create a language file and then set it using :

```
"oLanguage": {
  "sUrl": "media/language/your_file.txt"
}

```

Im not sure what server language you are using but something like this would work in PHP :

```
"oLanguage": {
  "sUrl": "media/language/custom_lang_<?php echo $language ?>.txt"
}

```

Where `language` matches the file name for a specific language.

or change individual settings :

```
"oLanguage": {
  "sLengthMenu": "Display _MENU_ records per page",
  "sZeroRecords": "Nothing found - sorry",
  "sInfo": "Showing _START_ to _END_ of _TOTAL_ records",
  "sInfoEmpty": "Showing 0 to 0 of 0 records",
  "sInfoFiltered": "(filtered from _MAX_ total records)"
}

```

For more details read this : <http://datatables.net/plug-ins/i18n>
Tradução para Português Brasil

```
    $('#table_id').DataTable({
    "language": {
        "sProcessing":    "Procesando...",
        "sLengthMenu":    "Exibir _MENU_ registros por página",
        "sZeroRecords":   "Nenhum resultado encontrado",
        "sEmptyTable":    "Nenhum resultado encontrado",
        "sInfo":          "Exibindo do _START_ até _END_ de um total de _TOTAL_ registros",
        "sInfoEmpty":     "Exibindo do 0 até 0 de um total de 0 registros",
        "sInfoFiltered":  "(Filtrado de um total de _MAX_ registros)",
        "sInfoPostFix":   "",
        "sSearch":        "Buscar:",
        "sUrl":           "",
        "sInfoThousands":  ",",
        "sLoadingRecords": "Cargando...",
        "oPaginate": {
            "sFirst":    "Primero",
            "sLast":    "Último",
            "sNext":    "Próximo",
            "sPrevious": "Anterior"
        },
        "oAria": {
            "sSortAscending":  ": Ativar para ordenar a columna de maneira ascendente",
            "sSortDescending": ": Ativar para ordenar a columna de maneira descendente"
        }
    }
});

```