-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard widget localization #17257
Comments
Generally yes, there shouldn't be a duplicate. However, we only support localization of widgets with layers. How did you attempt this? |
In my case users manage their dashboard with the AdminDashboard Module. That allows to place contents of stereotype "DashboardWidget", which is the hard coded behaviour. They can arrange simple text message on the dashboard. I couldnt figure out a way to make this work with Layers. As far as I see, the behaviour there is to handle stereotype "Widget", so you cant even configure the widgets of the AdminDashboard there? Users can localize the text widgets with an attached LocalizablePart. As there is no filter mechanic though, every translation gets rendered everytime.. The approach is to check if the widget is localized, and if so, compare it with the users culture to prevent rendering completely if necessary. Very simple change here commit 1fa6b23 Currently I provide that by overriding the template and I´m also fine to continue doing so. Even better if there is a built-in solution, but I thought it´s worth sharing |
I see, thanks for explaining. I assumed you used Localization Part but wanted to check. I think we can add a filter for this to the module, but there are two things that makes it more complicated than the solution you linked:
|
Sounds reasonable, it´s just been my only option without modifications to the platform and at least i was able to point out the issue this way. I will stick with my solution for now then and take a deeper look later |
Let's say you have I assume you would want to see the |
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
Currently when you localize a dashboard widget, let´s say English and German, you end up with both versions being displayed in the dashboard:
I just ran into this in a project and I think it should only display the english OR the german version, depending on the currently selected language. This could easily be achieved with a small modification in the dashboard.wrapper, without breaking anything.
Is my point valid, should I put up a pull request?
The text was updated successfully, but these errors were encountered: