Replace "we are having trouble communicating with the server..."

Hello everyone,
How can I replace the message “we are having trouble communicating with the server…” with a personalised message?

Hi Steph, it can be configured in the WebSession class:


I’m sorry! I hadn’t even seen it!
Thank you very much

1 Like

No need to apologize, we’re all here to help!


Thank you @Ricardo_Cruz, what you show above is fine if we want a unilingual message. Replacing the text as you describe with a localized constant does not work. We can however do it in code in the opening event of the session for example, with something like:

me.DisconnectMessage = kDisconnectMessage
me.InterruptionMessage = kInterruptMessage

… where the constants are localized constants.

In hope that this can help someone.


You can use constants in the IDE by prefixing them with a pound symbol: #kDisconnectMessage

This information is found in the documentation for localized strings.

1 Like

yes. I tried it first because this is how my app is localized all over (labels, grid headers, some text fields, etc.). It did not work with these two fields.

Good to know! That sounds like a bug in the framework :grimacing:
Hopefully Ricardo can get that fixed soon.

Is there a bug report for this in Issues?

I did not check and the workaround is very easy. I prefer that Xojo engineers spend time on more value added issues than this one.

Additional code workarounds for features that should already work are things Xojo staff members should spend time on. Features that require you know a specific workaround are exactly why AI for Xojo is an unrealistic expectation right now.

(That’s not to say I don’t appreciate you sharing this information!)

Issue created:
#76550 - Web Interrupt / Disconnect message can’t be localized