Appsilon / shiny.i18n

Shiny applications internationalization made easy
https://appsilon.github.io/shiny.i18n/
Other
168 stars 38 forks source link

Allow translations in modules #62

Closed jakubsob closed 3 years ago

jakubsob commented 3 years ago

Solution to #48, alternative approach to the one in #49.

Solution in mentioned PR requires to add usei18n(translator, ns) in each module to allow using update_lang. Proposed one allows to add usei18n only once in the app. If update_lang is called in a module session argument is of class session_proxy. To make sendInputMessage work (not to use namespace) a root session has to be used which can be accesses using session$rootScope()

przytu1 commented 3 years ago

I like this solution! Clean and elegant :100: . LGTM