<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Different languages in UI and application output]]></title><description><![CDATA[<p dir="auto">I wrote a QtWidget application that computes race rankings.<br />
Its output is a set of PDF files containing the computed rankings.</p>
<p dir="auto">The application UI is displayed in English or in my own country language, basing on the current locale. Let's call this language <em>langUI</em>.</p>
<p dir="auto">At present time the rankings are translated into the same language of the UI.</p>
<p dir="auto">I would like to add a combo box that allows the user to select the language in which the rankings will be printed on the PDFs. Let's call this second language <em>langPDF</em>. The selection of <em>langPDF</em> should not change the UI language at all.</p>
<p dir="auto">The solution of loading the <em>langPDF</em> translation before building the PDF and unloading it at the end, has an unacceptable drawback: any <em>debug</em>, <em>info</em>, <em>warning</em> and <em>error</em> messages produced in the meantime is translated to <em>langPDF</em> too. But all these messages are shown by the UI, so they should be produced in <em>langUI</em>.</p>
<p dir="auto">It seems that neither <code>tr()</code> not <code>translate()</code> provide any argument for specifying the translation language.</p>
<p dir="auto">Is there any facility for accomplish this?</p>
]]></description><link>https://forum.qt.io/topic/139289/different-languages-in-ui-and-application-output</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 04:39:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139289.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Sep 2022 15:48:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Different languages in UI and application output on Thu, 15 Sep 2022 12:42:04 GMT]]></title><description><![CDATA[<p dir="auto">Such implementation was my plan B. But at this point I belive that I will do just like that!</p>
<p dir="auto">Thank you for the clarification and suggestion.</p>
]]></description><link>https://forum.qt.io/post/728851</link><guid isPermaLink="true">https://forum.qt.io/post/728851</guid><dc:creator><![CDATA[Flinco]]></dc:creator><pubDate>Thu, 15 Sep 2022 12:42:04 GMT</pubDate></item><item><title><![CDATA[Reply to Different languages in UI and application output on Wed, 14 Sep 2022 18:18:20 GMT]]></title><description><![CDATA[<p dir="auto">One thing that comes to mind would be to change the language, do the printing operations, buffer all the possible informations/issues, switch the language back and then show the informations.</p>
]]></description><link>https://forum.qt.io/post/728744</link><guid isPermaLink="true">https://forum.qt.io/post/728744</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 14 Sep 2022 18:18:20 GMT</pubDate></item><item><title><![CDATA[Reply to Different languages in UI and application output on Wed, 14 Sep 2022 14:40:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
my app does not print on stdout or stderr.</p>
<p dir="auto"><em>debug</em> is an oversight; no debug message is displayed.</p>
<p dir="auto">With <em>info</em>, <em>warning</em> and <em>error</em> messages I mean strings that give feedback to the user (in specific text boxes) about:</p>
<ul>
<li>the consistency of the input data<br />
i.e. timings associated to non existent bibs, more timings that the allowed legs, etc...</li>
<li>the activity of the application<br />
i.e. that the PDFs have been generated successfully and in which directory, that the input data are not consistent and that no PDF has been generated, etc...</li>
</ul>
<p dir="auto">I think that it would be not "pleasant" to have these messages in English while the UI is in Italian (or vice-versa).</p>
]]></description><link>https://forum.qt.io/post/728733</link><guid isPermaLink="true">https://forum.qt.io/post/728733</guid><dc:creator><![CDATA[Flinco]]></dc:creator><pubDate>Wed, 14 Sep 2022 14:40:57 GMT</pubDate></item><item><title><![CDATA[Reply to Different languages in UI and application output on Tue, 13 Sep 2022 18:35:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">To the best of my knowledge, no.</p>
<p dir="auto">That said, what do you mean by info, debug, warning and error messages ? Those sent to stdout ?</p>
<p dir="auto">If so, why are you translating them ? That's typically the kind of message that is for the developer and if a user gets to send a log back to the developer, it would make more sense to have them in a single language so there's no need to go back and forth to understand what has happened.</p>
]]></description><link>https://forum.qt.io/post/728606</link><guid isPermaLink="true">https://forum.qt.io/post/728606</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 13 Sep 2022 18:35:17 GMT</pubDate></item></channel></rss>