Home Forum Developers GUI 4.0 Multi-language support in GUI 4.0

JRPassphrase Registration Control

In order to register on this site, you must first submit the passphrase below.

TODO list for each hardware target can be found as sticky topic in the corresponding forum


admin
useravatar
User Info

Multi-language support in GUI 4.0

Hi Guys,

Since some time we were discussing a multi-language support in GUI 4.0.
From time to time I hear that different people are translating the GUI 3.0 or GUI 4.0 in their local languages. I have already translation strings in French.
I've heard people translating in German and just understood for other guys translating in Polish.

I feel that those people can join their efforts to a multi-language version of GUI 4.0.

So if somebody is interetsed in this here we can discuss.

Thanks
Dimitar



Edited By:  admin
Aug-17-10 00:12:40

Administrator has disabled public posting
spiga
useravatar
User Info

Re: Multi-language support in GUI 4.0

Can you post the list of files to translate?

Thanks


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: Multi-language support in GUI 4.0

Hi Guys

we have just completed the migration of all English strings to js/language.js if you wish to aid in the translation efforts all you have to do is edit the language.js file and alter the text strings like so:

Code:


Current english string
lang['welcome'].en[12] = "Extension";
German translation
lang['welcome'].gr[12] = "Verlängerung";

then by changing the 'GUIlanguage: "en"' to 'GUIlanguage: "gr"' in index.html the GUI 4.0 will reflect the German language strings (we will make this more dynamic in the next few builds).

To make sure we don't have multiple people translating the same language please PM myself or admin if you wish to help!

ps: sorry if my translation is wrong for the above example, its was done using google!!

Thanks
Jason


Administrator has disabled public posting
fant
useravatar
User Info

Re: Multi-language support in GUI 4.0

Hi Guys
I propose:
1. String groupe to language

Code:


var lang = new Object;
    lang.en = new Object;
   
    lang.en['backup']= new Array;  //backup.html
    lang.en['backup'][0] = "File Upload in progress, please wait ..";
    lang.en['backup'][1] = "Backup File Uploaded";
    lang.en['backup'][2] = "Backup File Uploaded !!";

2. Only English strings create in js/language.js
Other language place in json-files in /locale/fr/language.json, /locale/ru/language.json
And download if request

Code:


var language = ASTGUI.loadHTML('./cgi-bin/gui_language.cgi').trim();

if (language == "fr" || language == "ru") {
    var lang_json = ASTGUI.loadHTML('./locale/' + language + '/language.json');
    var lang_obj = JSON.parse(lang_json);
    lang[language] = JSON.parse(lang_json);

I made change. If you agree, I will commit to svn


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: Multi-language support in GUI 4.0

Hi fant

Sounds good, i was thinking of splitting the language files up anyway to speed up load times.

for this line `if (language == "fr" || language == "ru")`
i would just say `if (language != "en")` that way you dont have to worry about adding new languages to the if.

let me know when you have committed so i can have a play.

Thanks
Jason


Administrator has disabled public posting
fant
useravatar
User Info

Re: Multi-language support in GUI 4.0

I committed in revision 524.
File /locale/en/language.json now not use. It for translate to other language.
File /js/tooltips.js must be change too.


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: Multi-language support in GUI 4.0

Looks good fant, much easier to work with smile

Will try it out tomorrow as its late here now.

Thanks
Jason


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 2585  Total Topics: 299  Total Polls: 1  Total Posts: 1727  Dormant
User Info:   Newest User :  dursber   Members Online: 0   Guests Online: 83
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked