Change dropdowns placeholder dynamically

Is it possible to modify the placeholder dynamically? I like to change it depending on language selection.

Hi, currently that is not possible.

Ok, that's bearable. But another wish is more important: For multilingual support I have to change the names of the flows dynamically. Otherwise the menu-items stay in default language. But I discovered that this is still not possible at the moment. Is there any workaround?

Thanks :slight_smile:

What do you mean by flows on this context? Can you cut/paste the bit of screen you mean ?

Ah I think it is the wrong designation. I mean UI-tabs. The settings page contains a dropdown to select the language.
Depending on this selection I like to switch the text of the menu items.

Node-Red-Menu

A work round would be to hide and show menu tabs specific to the language as selected in settings using ui control.

template contains e.g.
{"tabs":{"hide":["Recipes","Process","Measurements"]},{"show":["Rezepte","Prozess","Messungen"]}}

But then I have to have several tabs for each language, don't I?

Not very dynamic - but what you can do is set up environment variables outside of Node-RED (at the operating system level) eg TAB1="Recipes" etc then set the Tab to be ${TAB1} - when restarted then it will pick up those names.

Ok, that might be possible.
It would be fine, when something like "this.name = "Recipes"" inside a function node would be possible. I hope, it will be implemented in the next version :wink:

Well, it is possible with ui_control.
Connect e.g. a Inject Node with the following content:
msg.ui_control
{ "place":"This is the dynamic Placeholder" }

And voila the Placeholder Text changes.
Bildschirmfoto 2021-07-25 um 12.04.20

Nice reference over all the possibilities here:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.