Can be moved language outside Javascript?
Can be moved language outside Javascript?
toplisek
Posts: 26Questions: 5Answers: 0
I have an issue if there are 5 languages. How to set languages option as it is inside JavaScript by default like URL and format json.
Is this possible?
This discussion has been closed.
Answers
Some validations like Parsley use js outside Javascript. So, each table can be detected by language not inside jQuery. As it should be init only once it will block any language detection as this is doubled.
You can load a language file using the
language.url
option for DataTables.Allan
I understand this and I have put jQuery and all this stuff inside one init function.
Issue is that language should not be inside jQuery as it is separate function (many tables have different settings but one detected language at time). Language detection is based on script not jQuery init. If I put double init it will be an error as usual and posted.
Example:
I'm not sure I understand I'm afraid. You want to load a single language file that is used for all tables on the page? If so, then simply load that language file and have it extend the defaults.
Allan