Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Change default languages for the Translation widget' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Change default languages for the Translation widget
Authored by: tota on Aug 17, '06 04:57:08AM

For the German speaking people all over the world.
If you want the sequence to be as follows, use the text snippet below and replace the same part inside the Translation.js.

Default language from: German
Default language to: English
Choosable from languages: en, de, fr, it
Translationable languages: en, de, fr, it

Text part to be changed in Translation.jar:
**** Start of text snippet below this line****
*/


var ChineseS = ['en'];
var ChineseT = ['en'];
var Dutch = ['en','fr'];
var English = ['de','fr','it'];/*,'zh-Hans','zh-Hant','nl','el','ja','ko','pt','ru','es'*/
var French = ['de','en','it'];/*,'nl','el','pt','es'*/
var German = ['en','fr','it'];
var Greek = ['en','fr'];
var Italian = ['de','en','fr'];
var Japanese = ['en'];
var Korean = ['en'];
var Portuguese = ['en','fr'];
var Russian = ['en'];
var Spanish = ['en', 'fr'];

var languageData = [
{name:'English', code:"en", iso:"en", array:English},
{name:'German', code:"de", iso:"de", array:German},
{name:'French', code:"fr", iso:"fr", array:French},
{name:'Italian', code:"it", iso:"it", array:Italian},
/*{name:'Chinese (Simplified)', code:"zh", iso:"zh-Hans", array:ChineseS},
{name:'Chinese (Traditional)', code:"zt", iso:"zh-Hant", array:ChineseT},
{name:'Dutch', code:"nl", iso:"nl", array:Dutch},
{name:'Greek', code:"el", iso:"el", array:Greek},
{name:'Japanese', code:"ja", iso:"ja", array:Japanese},
{name:'Korean', code:"ko", iso:"ko", array:Korean},
{name:'Portuguese', code:"pt", iso:"pt", array:Portuguese},
{name:'Russian', code:"ru", iso:"ru", array:Russian},
{name:'Spanish', code:"es", iso:"es", array:Spanish}*/
];

var resizeAnimation = {startTime:0, duration:250, timer:null, list:null, onfinished:null};

var defaultFromLanguage = 1; // use English as the default from language
var defaultToLanguage = 3; // use German as the default to language
**** End of text snippet above this line*****

If you prefer other languages then play around with the available language codes inside the "var ..... = [" fileds where "....." stays for your language and with the sequence of the "var languageData = [{name:'....'" fields.

Under "var defaultFromLanguage = " you can set a number which reflects the possition of the desired language inside the "var languageData = [ ...... ];" field. The same applies to "var defaultToLanguage = ".

WARNING!!
Don't change the sequence of the top "var 'Language'" fields as the're be used somewhere else and if changed make the widget unusable.

So that's all about it and now you have your own translation widget behaviour.

Have fun and greetings from Switzerland
Thomas Thaler



[ Reply to This | # ]