how to use i18n dynamically based on the user locale automatically

how to use i18n dynamically based on the user locale automatically

vharivhari Posts: 4Questions: 0Answers: 0
edited October 2012 in General
I need to change the text of the button names, spdfMessage, etc. dynamically based on the user's locale. Can I specify multiple values for each language, so that dataTables automatically renders the relevant string based on the user's locale. For example,

[code]
$('#example').dataTable( {
"oLanguage": {
"sZeroRecords[en_US]": "No matching records found", //For English
"sZeroRecords[fr_FR]": "Aucun élément à afficher", //French
}
} );
[/code]
This discussion has been closed.