Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jqGrid Internationalization

I use jqGrid grid table plugin for my HTML files. How can I internationalize my table's column, header etc? I mean I will load a property file or change a variable, my table template will be in that language?

like image 976
kamaci Avatar asked Sep 16 '26 16:09

kamaci


2 Answers

Simply replace:

<script src="js/lib/grid.locale-en.js"></script>

with a language of your choice, like:

<script src="js/lib/grid.locale-pl.js"></script>

Standard (English) locale, Redmond theme:

English, Redmond

Polish locale, Le Frog jQuery UI theme:

Polish, Le Frog

Source

like image 163
Tomasz Nurkiewicz Avatar answered Sep 18 '26 06:09

Tomasz Nurkiewicz


I wrote my suggestion how one can implement the jqGrid internationalization in the post. See the demo for example. You can make yourself the changes which I suggestion. One needs only to modify the "i18n/grid.locale-XX.js" files without changing of the main jqGrid code.

So you will be able to implement pages which supports many languages, the default language will be choosed based on the language of the web browser. Moreover you can allow the user to change the jqGrid language dynamically from

enter image description here

to

enter image description here

for example.

P.S. Another old suggestion to use jQuery Globalization plugin could be also interesting for you.

like image 29
Oleg Avatar answered Sep 18 '26 04:09

Oleg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!