NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Questions related to EJS => Topic started by: lookang on November 15, 2009, 04:31:41 pm



Title: translation module enabled in NTNUJAVA Virtual Physics Laboratory Java forum?
Post by: lookang on November 15, 2009, 04:31:41 pm
translation module enabled in NTNU java forum?

i remember you mentioned during MPTL14 your presentation included translation into many languages in encouraged in Ejs and  NTNUJAVA Virtual Physics Laboratory Java Simulations in Physics.

Could enable it? so that we could reach the other languages.

i think it is not turn on for Web deployment of the applets. Look at the picture attached.(http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=1308.0;attach=1466;image)

strangely no non-english person has tried to translate any of my applets :( hahaha

for your consideration  ;D


Title: Re: translation module enabled in NTNUJAVA Virtual Physics Laboratory Java forum?
Post by: Fu-Kwun Hwang on November 15, 2009, 05:44:55 pm
I was talking about translation interface for simulations created before 2001 (Not simulations created with EJS).
It is available for all the simulations under JDK1.0.2 simulations (1996-2001) (http://www.phy.ntnu.edu.tw/ntnujava/index.php#2).
For example: you can check out pendulum (http://[url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=11.0) and select the last one in the slection menu(translated to Finnish by hthunebe)

EJS has it's own translation tool when running in application mode. (download jar file and runing locally).
The translation tool is not available when EJS simulation is running as an applet.

If you think it is necessary to have a language translation interface for EJS simulations,
I will try to find a way to implement it , too!


Title: Re: translation module enabled in NTNUJAVA Virtual Physics Laboratory Java forum
Post by: lookang on November 17, 2009, 09:42:32 pm
fantastic translator you have implemented.

i will test it n report any bugs:)

Will it be saved automatically into future downloads of the xml or jar or both?

To promote users translation for your forum, do you intend to have a system to give recognition to translator?
i think if you have a counter for number of applets translated , language translated etc, it will do wonders for your efforts to scale to all schools in the world, for the world of physics learning!!!


Title: Re: translation module enabled in NTNUJAVA Virtual Physics Laboratory Java forum?
Post by: lookang on November 17, 2009, 10:14:11 pm
Wow! Woooooow!

the translation works like a charm This is Cooooool! ;D, i managed to add easily to the english one.

I think i need to setup my iMac language to chinese for the chinese translation strings to appear.


by the way, there was a funny error but is does not affect the translation and i cannot reproduce it anymore. maybe there is no problem.

thanks Prof. Hwang!!! It is so motivating to improve this forum cos you can do it so quickly. U r the best!


Title: Re: translation module enabled in NTNUJAVA Virtual Physics Laboratory Java forum?
Post by: Fu-Kwun Hwang on November 17, 2009, 10:59:06 pm
The error you found might be due to that I was testing the code.
The translated string in View elements will be added to EJS jar file.
However, it might not be shown in the simulation at once because the jar file has been loaded into browser (and it would not reload it again).
So you might need to close the browser and re-open the web page again to view updated translation.

I also make it possible to translate strings defined in variable tabs from EJS model.
Those changes are activated by javascript, so you should be able to see the result after you submit the translation.

The code still need to be tested and add more features.
Suggestion will be highly appreciated!


Title: Re: translation module enabled in NTNUJAVA Virtual Physics Laboratory Java forum?
Post by: Shinelight on November 19, 2009, 02:29:59 pm
Hi Hwang

I tried to translate a post into Bahasa Indonesia but I got this alert below
Warning: Invalid argument supplied for foreach() in /www/htdocs/demolab/smf/ejsparser.php on line 240

For your info

Cheers, Shinelight


Title: Re: translation module enabled in NTNUJAVA Virtual Physics Laboratory Java forum?
Post by: Fu-Kwun Hwang on November 19, 2009, 04:35:17 pm
Thank you for your feedback!

Please post your message at the same topic where you did the translation, so that it will be easier for me to find out the problem.

I just created the translation interface in the last two days and I am changing the code to make it better.
May be you were doing it while I modified the code and there is a bug.
Please try it again and let me know if the problem is still there.