<table><tr><td style="">asemke added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D23119">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D23119#524720" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D23119#524720</a>, <a href="https://phabricator.kde.org/p/aacid/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@aacid</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D23119#519676" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D23119#519676</a>, <a href="https://phabricator.kde.org/p/asemke/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@asemke</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>The original problem in LabPlot was reported by a windows user. The proposed fix won't fix the problem on windows. I think the only way to get the proper strings on Windows is to get the current language of the application, to create a QLocale with the proper language and to use QLocale::toString(const QDateTime &dateTime, const QString &format)... If this is correct, then we're are back to my original question I asked on IRC/Matrix - how to determine the current application language?</p></div>
</blockquote>
<p>Are you saying that the old code actually half works on Windows?</p></div>
</blockquote>
<p>What works on windows well is switching of the application language in general:<br />
<a href="https://phabricator.kde.org/F7349563" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F7349563: labplot_ukrainisch.png</a></p>
<p>Here you see the current release candidate running on windows. The windows desktop is German, the application language in LabPlot was set to Ukrainian. This works well. What doesn't work is the handling of QDate/QDateTime that is shown in the menu on this screenshot and marked red. Originally this problem was reported to us for the German-English combination (desktop in German, application language English).</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>I find that surprising since it means that setting the LANGUAGE environment variable on Windows does things, which according to a quick internet search doesn't seem to be the case</p></blockquote>
<p>I don't understand the whole mechanism here now but I see that kswitchlanguagedialog_p.cpp writes the new language into the new file klanguageoverridesrc. The content of this file for the example above is</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">[language]
labplot2=@ByteArray(uk:en_US)</pre></div>
<p>I assume, based on this information, and not on the value of LANGUAGE which is not existing on Windows, the i18n-stuff is properly initialized and we show the correct strings.</p>
<p>Btw, klanguageoverridesr is put into QStandardPaths::GenericConfigLocation which is C:/Users/<USER>/AppData/Local on Windows.I'd say this is wrong and nedds to go into the Roaming folder.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R263 KXmlGui</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23119">https://phabricator.kde.org/D23119</a></div></div><br /><div><strong>To: </strong>aacid<br /><strong>Cc: </strong>yurchor, apol, kde-frameworks-devel, asemke, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>