Quantcast
Viewing all articles
Browse latest Browse all 268

How can I set HTMLLanguage per session or form?

Hi, we have IntraWeb applications where we update various UI texts (e.g. TIWLabel.Caption) based on an account language setting for customers of our system, using our own code in base form(s) and helper components, and this in itself is no problem and has been in place since the first version of our applications many years ago. However, the web pages generated by IntraWeb always has a &thtml lang="en"&t element which is incorrect for our customers that use non-English application languages. Previously this was not much of an issue in practice, but with some recent auto-translate features in modern browsers (e.g. Edge) we have seen some weird effects, where not only fixed texts but also some of those coming from the customer's own data have been modified in the browser compared to their actual values in the HTML page in question. Therefore I would like to set a correspondent of the server controller global property HTMLLanguage per session or form, or find a workaround that allows me to adjust the &thtml lang="en"&t element of the generated web page in a more direct way.

So far my searches with AI, Google and in this forum for this have been fruitless. As an experiment, I tried to change ServerController.HTMLLanguage in the BeforeRender event (although I knew this would not be a preferred solution (and probably not thread safe)) but this turned out not to be possible at all (the property setter threw an exception due to being locked in this event). Would be very grateful for feedback on this issue. Currently using IW version 15.2.49 in production.

Best regards

Magnus Oskarsson

Viewing all articles
Browse latest Browse all 268

Trending Articles