<div dir="rtl"><div dir="ltr">More <span style="font-size:13.125px">investigation shows that it does not work with other locales than the default one (the one that is used in case you don't pass a country code, which, in case of Arabic, is ar_EG).</span></div><div dir="ltr"><span style="font-size:13.125px"><br></span></div><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:13.125px">[safa@archlinux]$ LANG=ar_BH.utf8<br></span><span style="font-size:13.125px">[safa@archlinux]$ python testQtLocale.py<br></span><span style="font-size:13.125px">b'\xd9\xa2\xd9\xa0 B'</span><span style="font-size:13.125px"><br></span><span style="font-size:13.125px">[safa@archlinux]$ LANG=ar_EG.utf8<br></span><span style="font-size:13.125px">[safa@archlinux]$ python testQtLocale.py<br></span><span style="font-size:13.125px">b'\xd9\xa2\xd9\xa0 \xd8\xa8\xd8\xa7\xd9\x8a\xd8\xaa'</span><span style="font-size:13.125px"><br></span><span style="font-size:13.125px">[safa@archlinux]$ LANG=ar_SA.utf8<br></span><span style="font-size:13.125px">[safa@archlinux]$ python testQtLocale.py<br></span><span style="font-size:13.125px">b'\xd9\xa2\xd9\xa0 B'</span><span style="font-size:13.125px"><br></span><span style="font-size:13.125px">[safa@archlinux]$ LANG=ar_TN.utf8<br></span><span style="font-size:13.125px">[safa@archlinux]$ python testQtLocale.py<br></span><span style="font-size:13.125px">b'20 B'</span></blockquote><div style="font-size:13.125px"><br></div><div style="font-size:13.125px">Notice the translated version of "B" in ar_EG. The locale is set correctly as we can see ar_TN uses the correct English/Arabic (not Hindi) numbering system.</div><div style="font-size:13.125px">So it seems that the files are registered for that ar_EG locale only, which is causing the trouble.</div><div style="font-size:13.125px"><br></div><div style="font-size:13.125px">Note: Qt prioritizes LANGUAGE which has no country code, and that was the problem. I'll be sending a small patch to use LANG if the first choice in LANGUAGE is the same as LANG's main language.</div><div style="font-size:13.125px"><br></div><div style="font-size:13.125px">Regards</div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2018-01-10 5:49 GMT+03:00 Safa Alfulaij <span dir="ltr"><<a href="mailto:safa1996alfulaij@gmail.com" target="_blank">safa1996alfulaij@gmail.com</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto">Well, I don't want to remove it but it's a must. First it's not right logically and second is that Qt prefers it over LANG, and use any locale varient since it has no country name. (QLocale("ar") returns "Arabic (Egypt)" (which is defind in unicode), instead of my "Arabic (Bahrain)" locale.</div><div dir="auto">And it's the only thing that is not getting translated which is obviously a bug.</div><div dir="auto"><br></div><div dir="auto">Regards</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Jan 10, 2018 12:20 AM, "Albert Astals Cid" <<a href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El dimarts, 9 de gener de 2018, a les 20:08:02 CET, Safa Alfulaij va escriure:<br>
> Hello all.<br>
><br>
> After doing some investigation about a problem, I came into an issue in<br>
> loading correct translations in Frameworks (that has the “_qt” suffix in<br>
> translation system).<br>
> Previously, I had my LANGUAGE enviroment variable containing “ar”, which is<br>
> because I added Arabic in my “Language” KCM (without knowing that I don't<br>
> need it if the locale is alread set to Arabic).<br>
> This was normal and things was translated well. Today I removed that “ar”<br>
> because it's not needed, and all applications (Qt, KDE, Gnome, other KF5s)<br>
> worked except for those frameworks which are using QM files (the ones with<br>
> “_qt” suffix). The translation isn't loaded and strings are shown in<br>
> English.<br>
<br>
So don't remove it?<br>
<br>
Cheers,<br>
Albert<br>
</blockquote></div></div>
</div></div></blockquote></div><br></div>