Closed rg1 closed 1 year ago
Hello @rg1 ,
I made simplified sample: https://plnkr.co/edit/TqMfy6BjSGXXMKvq And the Carousel arrows tooltips seems to work fine.
Best Regards, Lidiya
@LidiyaGeorgieva So, I seem to be wrong about the browser language. Maybe it's the language initially set for UI5. After switching the language, the tooltips are off. Please reopen the bug.
Hello @rg1 ,
Please see the documentation for "setLanguage" method: https://sapui5.hana.ondemand.com/#/api/sap.ui.core.Configuration%23methods/setLanguage It is described, that: "The framework does not guarantee that already created, language dependent objects will be updated by this call. It therefore remains best practice for applications to switch the language early, e.g. before any language dependent objects are created. Applications that need to support more dynamic changes of the language should listen to the localizationChanged event and adapt all language dependent objects that they use (e.g. by rebuilding their UI)."
Best Regards, Lidiya
@LidiyaGeorgieva You're correct, I did not see/remember, nor expect, that part of the documentation. Given that you're updating all the other language dependent strings I've encountered so far, I've come to expect this to work for native UI5 controls. Also, with this statement you're asking us to check every control we use. This makes me quite unhappy, but I guess I'll have to take it,
@rg1 this won't help you, but let me add some comments to complete the picture:
We discussed this feature already several times in the past (e.g. due to #2709, #1258, #741). But management decided that the use cases for a dynamic language change of an already created UI are too rare to justify the significant effort for a complete solution. For the known use cases, a change of the language + restart seemed to be acceptable, albeit not being optimal for the end user.
Some details reg. the necessary effort can be found around https://github.com/SAP/openui5/issues/2079#issuecomment-1058908149 .
OpenUI5 version: 1.108.0 (but really any version that supports Carousel)
Browser/version (+device/version): any (tried Chrome and Firefox)
Any other tested browsers/devices(OK/FAIL): nope
URL (minimal example if possible): https://plnkr.co/edit/YCVZLAms72cm9oY8?preview
Steps to reproduce the problem:
What is the expected result?
Text for the Carousel buttons should be displayed in the language set for UI5, like all other messages (e.g. Table in the example)
What happens instead?
Text is localized to the browser language
Any other information? (attach screenshot if possible)