Hi,
When using the date range picker in 2.12.0 the "Today" button is not translated after setting the langauge to "DutchFlemish" language with UI client action DatePickerSetLanguage. Same applies when changing the locale of te module to "nl-NL".
All other text elements on the screen (Days, Months, etc) are translated to the Dutch language.
Kind regards,
Peter Vermeulen
Hi @Peter Vermeulen
Thanks for reaching out. Could you please share an oml with that implementation so that we can take a look?I just ran a quick test and I'm getting it translated:
Best Regards,GM
Thanks for your reply. I tested the same module after your reply without any changes or publish. During the test "Today" appeared to be translated to "Vandaag". Strange!
Kind regards,Peter
If you still want to share the oml we can try to understand if there's a reason for you to get that the first time since there might be an edge case, a situation, or a certain timing in the lifecycle of the pattern that can have that side effect.Thanks for the feedback 💪🏻
Hi GM,
I was able to figure out what happened. I was using OutSystems UI 2.10.0 yesterday where I had issues with the client actions in the Initialized event handler (infinite loop). Also the translation for "Today" was not translated to "Vandaag".
I tried to set the module locale and the SetLanguage client actions in the OnReady screen handler. All with the same incorrect result. I also tried to update to OutSystems UI 2.12.0 but probably didn't refresh the page during testing.
Attached the oml, which I published on my environment with OS UI 2.10.0 (resetted). De DatePicker language is set on the OnReady event, the DateRangePicker language is set on the Initialized event of the DatePickerRange widget.
Errors- Date Picker button Today not translated- Date Range Picker runs in een infinit loop when selection (visible in Inspect)
Since it looks to be solved in OS UI 2.12.0, it might be interesting or the wrong behavior in 2.10.0 is really solved.
Regards, Peter
Thank you very much for sharing. As a best practice in terms of using the DatePickerSetLanguage you should always use it in the On Initialize of the picker itself since it's when we guarantee that the javascript object is fully built.Regarding the usage of the SetLanguage client action, we're trying to make some improvements to make better use of it when set in the layout level where currently you're able to set the screen language.
Cheers,GM
Hi GM,Using the DatePickerSetLanguage in the On Initialize result in UI 2.10.0 resulted in a infinite loop. As a work around I tried it on the screen event On Ready which worked for this widget.
I also set the locale on System Event On Application Ready which worked as well.
However in UI 2.12.0 the infinite loop is solved and the DatePickerSetLanguage can be executed in the On Initialized event of the date picker.
Thanks for your replies on this topic.
Regard, Peter