The idea is:
In the HTML output of the hosted chat, the ‘lang’ attribute of the tag is hard-coded to “en” at the moment (packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/templates.ts line 59).
This attribute regulates things like hyphenation rules (breaking words to a new line if they are exceeding the screen width - the rules for this are language dependent).
As such, I would appreciate it if we could set this value in the chat trigger node or on workflow-level. The hyphenation can be activated via CSS, but the language can only be set via the HTML.
My use case:
I have a chatbot workflow dedicated to a German-speaking audience. As the English hyphenation dictionary does not tell the browser how to handle German words, they are line-wrapped at random locations.
Especially on mobile devices, it often happens that words exceed the line width.
I think it would be beneficial to add this because:
Many applications are designed with a non-English audience in mind.