APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Change language on click post and replies

Return to the Change language on click thread
Login to post to this thread

Change language on click
Apostolos Michaloudis
28 Posts

Is there a way or a command in order to change the language by pressing a button?

I want to make a menu where the user can change language by clicking on a menu item


Replies to Change language on click

Re: Change language on click -
Francisco Esquembre
228 Posts

Hi,

In the Java flavor of EjsS, there is. Try _simulation.setLocale(String language);
Where "language" is the string for your language. I.e. "en" for English, "es" for Spanish...

Paco



Re: Re: Change language on click -
Wolfgang
146 Posts

The EJS Language Translation API is explained in the following video.

http://www.compadre.org/osp/items/detail.cfm?ID=10317



Re: Re: Re: Change language on click -
Apostolos Michaloudis
28 Posts

Thank you mr. Esquembre and mr. Wolfgang !



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book