change language dynamically during application lifetime

121 views
Skip to first unread message

Michallis Pashidis

unread,
Jul 27, 2014, 2:59:38 PM7/27/14
to jrebirt...@googlegroups.com
Hi, 

I was looking into many mail lists upon changing the language dynamically during the application lifetime. 

I saw on many javafx threads that this is only possible through re-loading all your resource bundles. 

When looking at JRebirth, i see that in FXMLUtils:
Method: public static <M extends Model> FXMLComponent loadFXML(final M model, final String fxmlPath, final String bundlePath)

Isn't it possible to implement somehow a way to dynamically update and reload your resource bundles? 

Did you have already questions (out of this mail thread) upon changing the language for all fxml files? (or views).


my sincere regards, 

Michallis

Sebastien Bordes

unread,
Jul 31, 2014, 4:27:48 PM7/31/14
to jrebirt...@googlegroups.com
Hi Michallis,

Sorry for the delay but I was on holidays far from any computer.

Yes it can be possible to implement a such feature by forcing the FXMLModel reloading, then we could create a Command that will reload all model by using new locale.

I will experiment something soon, perhaps for 7.7.3

If you have any precision or remark let me know.

Seb


--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "JRebirth Users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jrebirth-user...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.



--

Michallis Pashidis

unread,
Aug 8, 2014, 1:35:23 AM8/8/14
to jrebirt...@googlegroups.com
Hi Sébastien, 

Thank you for the response.
I’m experimenting a lot with jRebirth, and after understanding your approach, it works fine to me. Maybe i can contribute to your project, because anyhow i have to look for a dynamic solution upon the language. 

Sincere regards, 
Michallis

Vous recevez ce message, car vous êtes abonné à un sujet dans le groupe Google Groupes "JRebirth Users".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/jrebirth-users/9UHEPH1EAIY/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse jrebirth-user...@googlegroups.com.

Sebastien Bordes

unread,
Aug 8, 2014, 3:16:00 AM8/8/14
to jrebirt...@googlegroups.com
Hi Michallis,

Obviously any contribution is welcomed, we can discuss about main development  directions on the developer mailing list.
If you want to improve i18n dynamic reloading I can create a dedicated branch based on 8.x and build with another jenkins job.

The main problem I see is to reload a view without loosing any user input, 2 ways are possible:
- reload Model (FXML or not) then re-apply user input stored into an object by bindings
- only update label using l10n file

Perhaps the first way is better but imply a good binding mapping to avoid loosing something.

In any case if you see something ugly or too complex into the JRebirth source code, let me know, the main development word is KISS especially for JRebirth's end-users.

I'm currently preparing the 7.7.3 release and in parallel working on introduction of Behavior into 8.x branch (used by wip workbench and other secret things...), so many topics ! my time is running out.

Regards

Seb
Reply all
Reply to author
Forward
0 new messages