Datatable Language
Datatable Language

Hello.
I want to know If it's possible to put in "language" a variable from javascript. I mean:
"language":{
"sInfoPostFix": "",
"sSearch": ** $rootScope.var** ,
"sUrl": "",
}
or language just receive strings?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
my page contains two languages, so I want to know if I can put a dynamic var. depending on the language user wants to see.
If your variable contains a string, then yes, sure you can do that: http://live.datatables.net/fisohisa/1/edit
Allan
thanks!
The fact is that I have a method that calls a rest service in java which selects the language by "labels" in a file.properties (With all the labels in spanish or english).
I call the method in this way
This $rootScope.labels = response.data; shows all labels in spanish
(My spanish file.properties is somenthing like this:
but when I try this (for example):
it does not recognized the variable
so there is the issue . For this reasons is always showing by default "Search" because it's like it doesn't recognize that rootScope 
I'm not sure I can help you with that I'm afraid as I'm not sure not sure what $rootScope is. I'd need a working example showing the issue, but even then it might be beyond the support we can provide since it doesn't appear to be specific to DataTables but rather to whatever framework you are using.
Allan