Closed mehdihadi closed 3 years ago
hey @mehdihadi , could you test if this solution from this thread works for you: https://github.com/Appsilon/shiny.i18n/issues/48#issuecomment-730323324 Basically, it's related to how shiny handles sessions within the modules.
Dear @dokato thanks for your comment, I tried #48 (comment) but I think this issue is not similar my one. My problem is about the translation of nested modal (the modal rendered in another modal). By the way, my problem is not resolved and I decides to use "if " for language selection. thanks anyway...
Ok, could you show then your minimal example, where you introduced passing a global session to your Shiny module that renders a modal?
Hi @dokato my completely reproducible example is here. Simply when you click on the "test" button, the first modal dialogue displayed where translation is OK. But when you click the "submit" button (in the first modal) then in the second displayed modal translation not works!!!
Hi @mehdihadi in this example from SOF, there is no global session in your modal as I suggested before. Please try passing global session (eg. session from the main server of your app) there.
I want to translate modal dialogues in my modularized shiny app. As I presented in my reproducible example here, in the first module (register) I have no problem as registerUI() rendered the first modal dialogue and translation works well. But my problem is with the UI of module 2 (M2UI) which this function itself has been called within the server of module 1 (register) to return the second modal dialogue. But i18n probably not detected and translation not works on the displayed new modal. Any suggestions why this happens? thanks in advance.