dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.76k stars 227 forks source link

Changing i18n after build application not works. #222

Closed jhk0530 closed 1 year ago

jhk0530 commented 1 year ago

Hi, thanks for building an awesome package. I use this for my projects and sometimes I use this standalone to custom ggplot figures easier.


Here's my problem and what I tried.

I'm building shiny application which can support more than 1 language. (of course with esquisse)

build application with esquisse_ui and esquisse_server

when the user changes the language option (suppose input$lang)


Here's my question.

Is there any methods to change the language by user's input?

Thanks.

jhk0530 commented 1 year ago

esquisse

Here's gif file. for what happen when re-rendering ui & server ( it shows, plot very shortly)

change Title, subtitle will work. but not main plot

jhk0530 commented 1 year ago

Problem solved.

it seems no need to declare esquisse_server for every update but just for UI.

pvictor commented 1 year ago

Nice work. Indeed the server needs to be declared only once.

And the yes, the i18n mechanism is not currently reactive, so it's not possible to switch language inside the app session (except the way you did), an other solution will be to restart the application with session$reload() after changing the language.