Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h2>A bit of explanation</h2> <p>jqPlot uses jsDate internally: <a href="http://sandbox.kendsnyder.com/date2/" rel="nofollow">http://sandbox.kendsnyder.com/date2/</a></p> <p>jsDate has built-in localization support and locale detection. This capability, however, is limited to a few ,pre-configured languages, on internal regional table (see <strong>2.</strong>).</p> <p><strong>1. For the lucky ones</strong></p> <p>Since in my version of jqPlot (v1.0.4) the French language is included in this table (maybe a gift from the authors) all you have to do is simply setting the <code>lang</code> attribute on your <code>&lt;html&gt;</code> tag:</p> <pre><code>&lt;html lang="fr"&gt; </code></pre> <p>Et voilà...</p> <p><strong>2. Foreigners</strong></p> <p>If you want to add your own missing language at runtime you can use these instructions:</p> <pre><code>$(document).ready(function(){ // Add a new localization $.jsDate.regional['it'] = { monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu','Lug','Ago','Set','Ott','Nov','Dic'], dayNames: ['Domenica','Lunedi','Martedi','Mercoledi','Giovedi','Venerdi','Sabato'], dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], formatString: '%d-%m-%Y %H:%M:%S' }; // Do not forget to call $.jsDate.regional.getLocale(); }); </code></pre> <p>Do not forget to call <code>$.jsDate.regional.getLocale()</code> to refresh internal settings and to set the <code>&lt;html&gt;</code> tag accordingly.</p> <p>Mine looks like: </p> <pre><code>&lt;html lang="it"&gt; </code></pre> <p>That's all...</p> <p>If you aren't able to control the markup for the <code>html</code> tag, you can set it with</p> <pre><code>document.documentElement.setAttribute('lang', 'it'); </code></pre> <p>It doesn't work to set <code>lang</code> of an intermediate element, like a surrounding <code>div</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload