SteelSeries Gauges: Difference between revisions

18 bytes removed ,  11:32, 19 December 2012
no edit summary
No edit summary
Line 68: Line 68:
Obviously with the url changed to where ever you want the redirect pointing.
Obviously with the url changed to where ever you want the redirect pointing.


== Changing Languages ==
== Changing Languages ==


To switch statically, you need to edit the "gauges.js" file, and change the line 22<br> var _strings = LANG.EN,<br>to<br> var _strings = LANG.XX,<br> (where XX is the desired language code).  
To switch statically, you need to edit the "gauges.js" file, and change the line 12:
    var strings = LANG.EN,
  to
    var strings = LANG.XX,
  (where XX is the desired language code).  


To add a new translation, edit the "language.js" file and copy one of the existing sections<br>e.g. English, to the end of the file, changing all the LANG.EN values to LANG.XX (where XX is<br>the code for the new laguage), and editing all the strings. The zip file contains a<br>language.js file with English, French, German, Dutch, Swedish, Danish, Finnish, Italian,<br>Spanish, and Catalan translations to get you going.  
To add a new translation, edit the "language.js" file and copy one of the existing sections e.g. English, to the end of the file, changing all the LANG.EN values to LANG.XX (where XX is the code for the new language), and editing all the strings. The zip file contains a language.js file with English, French, German, Dutch, Swedish, Danish, Finnish, Norwegian, Italian, Spanish, and Catalan translations to get you going.  


If you are only going to use one language, then deleting the unused language options and the<br>changeLang() function from the language.js file will speed up the page load time slightly.  
If you are only going to use one language, then deleting the unused language options and the changeLang() function from the language.js file will speed up the page load time slightly.  


To switch languages dymanically, you need to add script to your page which sets the LANG<br>object to equal the desired language and then calls the changeLang() function.<br>e.g.<br> // Dynamic script to change the default language to German<br> changeLang(LANG.DE);  
To switch languages dynamically, you need to add script to your page which sets the LANG object to equal the desired language and then calls the changeLang() function.
 
e.g.
This will re-label all the gauges, and update the text/radio buttons etc on the web page.
    // Dynamic script to change the default language to German
 
    changeLang(LANG.DE);  
However, changing the language for the gauges DOES NOT translate the displayed forecast<br>as the texts of the message are being supplied by your weather station/software.


This will re-label all the gauges, and update the text/radio buttons etc. on the web page.


However, changing the language for the gauges DOES NOT translate the displayed forecast as the text of the message is being supplied by your weather station/software.


== Forecast Messages ==
== Forecast Messages ==