This article is a mirror article of machine translation, please click here to jump to the original article.

View: 4345|Reply: 1

[Jquery] jQuery Datatables internationalization plugin

[Copy link]
Posted on 5/21/2022 9:13:08 PM | | | |
Requirements: jQuery Datatables is a very good front-end table plug-in, through which the back-end API interface is configured, the interface returns JSON data, and the plug-in helps us automatically render tables with content, and the plug-in also supports server-side sorting, pagination, search and other functions. Localization is important for any package, how can I use the plugin to achieve internationalization?

Address:The hyperlink login is visible.

Note: The official website has 90 Chinese language packs, but some translations are not complete, as shown in the figure below:



jQuery Datatables can support loading language information from remote files by configuring language.url, seeing:The hyperlink login is visible.

Of course, we can also directly configure the language information through variables, referring:The hyperlink login is visible.

I willSimplified Chinese, English, Hindi, German, Russian, JapanesePackaged into a JS file as follows:

datatables-i18n.js (33.24 KB, Number of downloads: 1, 售价: 3 粒MB)

Let's switch the language display separately, the rendering is as follows:



The js code is as follows:

PassConfigure the value of languageto achieve international functions.

(End)





Previous:ASP.NET Core (XV) uses HttpClient to send HTTP requests
Next:New SQL Server users are allowed to access only certain databases
Posted on 5/21/2022 10:58:37 PM |
Learn to learn
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com