<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>My take on getting the locale from Qt and setting it in Python:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>import locale<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>def get_qgis_locale():<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>    loc = QLocale()<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>    <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>    for lang in loc.uiLanguages():<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>        if lang.startswith(loc.bcp47Name()):<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>            return '%s.UTF-8' % lang.replace('-', '_')<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>        return 'en_US.UTF-8'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>locale.setlocale(locale.LC_ALL, get_qgis_locale())<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>print(locale.getlocale())<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>uiLanguages() is a bit ambiguous, when using auto locale it just shows ‘de’ for me, setting <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>the override – not the user interface – to nl_BE it shows ‘nl-BE’ which should be enough for setting locale.setlocale, you just need to replace the dash with an underscore. There is still the possibility that this will break on some language combinations though.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>Frank<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b>Von:</b> Qgis-user <qgis-user-bounces@lists.osgeo.org> <b>Im Auftrag von </b>Alessandro Pasotti<br><b>Gesendet:</b> Donnerstag, 9. August 2018 09:30<br><b>An:</b> Reginald Carlier <Reginald.Carlier@ingelmunster.be><br><b>Cc:</b> qgis-user@lists.osgeo.org<br><b>Betreff:</b> Re: [Qgis-user] localisation of date fails in QGIS 3.2<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>On Thu, Aug 9, 2018 at 9:23 AM, Reginald Carlier <<a href="mailto:Reginald.Carlier@ingelmunster.be" target="_blank">Reginald.Carlier@ingelmunster.be</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE style='font-family:"Tahoma",sans-serif;color:#1F497D'>Thanks a lot Alessandro,</span><span lang=NL-BE><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE style='font-family:"Tahoma",sans-serif;color:#1F497D'> </span><span lang=NL-BE><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE style='font-family:"Tahoma",sans-serif;color:#1F497D'>That works perfectly.</span><span lang=NL-BE><o:p></o:p></span></p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Glad it helped.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>btw, this is a side-effect of the recent changes in QGIS locale: we are now using setting a "default locale" (from QGIS settings) when QGIS starts, and that locale is used through the whole QGIS application.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If you change the default locale in the settings, please remember to restart QGIS.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE style='font-family:"Tahoma",sans-serif;color:#1F497D'> </span><span lang=NL-BE><o:p></o:p></span></p><div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:3.75pt 0cm 3.75pt 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:1.5pt 0cm 1.5pt 0cm'><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#5C676D'>Reginald Carlier<o:p></o:p></span></p></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:1.5pt 0cm 1.5pt 0cm'><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'>Deskundige GIS<o:p></o:p></span></p></td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:2.25pt 0cm 2.25pt 0cm'><p class=MsoNormal><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:1.5pt 0cm 1.5pt 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>Gemeente Ingelmunster<o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>, <o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'><u><span style='color:blue'>Oostrozebekestraat</span></u> <u><span style='color:blue'>4</span></u><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'><u><span style='color:blue'>,</span></u> <o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'><u><span style='color:blue'>8770</span></u><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'> <o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'><u><span style='color:blue'>Ingelmunster</span></u><o:p></o:p></span></a></span></p></td></tr></table></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:1.5pt 0cm 1.5pt 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>T<o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>+32 51 33 74 39<o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 3.75pt'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>www.ingelmunster.be<o:p></o:p></span></a></span></p></td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:3.0pt 0cm 1.5pt 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></table></td></td></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:7.0pt;font-family:"Tahoma",sans-serif;color:#000001'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#000001;text-decoration:none'><span style='color:#5C676D'>Raadpleeg onze disclaimer </span><o:p></o:p></span></a></span></p></td></tr></table></td><p class=MsoNormal><b><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>Van:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> Alessandro Pasotti [mailto:<u><span style='color:blue'>apasotti@gmail.com</span></u>] <br></span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;text-decoration:none'>Verzonden:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> donderdag 9 augustus 2018 9:10<br></span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;text-decoration:none'>Aan:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> Reginald Carlier<br></span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;text-decoration:none'>CC:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> Nyall Dawson [via OSGeo.org]; <u><span style='color:blue'>qgis-user@lists.osgeo.org</span></u><br></span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;text-decoration:none'>Onderwerp:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> Re: [Qgis-user] localisation of date fails in QGIS 3.2</span><span style='color:windowtext;font-weight:normal;text-decoration:none'><o:p></o:p></span></a></span></b></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><div><p style='margin:0cm;margin-bottom:.0001pt'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>Reginald,<o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>Using QT:<o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>locale = QLocale(QLocale.Japanese)<o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>locale.toString(QDate.currentDate())<o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>And, if you want to use the same settings that you set in QGIS, just use the default locale:<o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>locale = QLocale() # Default locale from QGIS options/settings <o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>locale.toString(QDate.currentDate())<o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><p style='margin:0cm;margin-bottom:.0001pt;white-space:pre-wrap'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>On Thu, Aug 9, 2018 at 8:54 AM, Reginald Carlier <<u><span style='color:blue'>Reginald.Carlier@ingelmunster.be</span></u>> wrote:<o:p></o:p></span></a></span></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'>I forgot to mention that I import datetime as follows:</span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'>from datetime import datetime</span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'>In the console I get the same result as from my script.</span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'>Maybe I should use QCoreApplication.translate or some other explicit way to tell python to translate a string from English to Dutch?</span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'>Regards,</span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-family:"Tahoma",sans-serif;color:#1F497D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=NL-BE style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:3.75pt 0cm 3.75pt 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:1.5pt 0cm 1.5pt 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>Reginald Carlier</span><span style='font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:1.5pt 0cm 1.5pt 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>Deskundige GIS</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:2.25pt 0cm 2.25pt 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><b><span lang=NL style='color:blue'>Fout! Bestandsnaam niet opgegeven.</span></b></span><span style='font-size:11.0pt;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:1.5pt 0cm 1.5pt 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>Gemeente Ingelmunster</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>, </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'><u><span style='color:blue'>Oostrozebekestraat</span></u> 4</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'><u><span style='color:blue'>,</span></u> </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'><u><span style='color:blue'>8770</span></u></span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'> </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'><u><span style='color:blue'>Ingelmunster</span></u></span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></tr></table></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:1.5pt 0cm 1.5pt 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>T</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>+32 51 33 74 39</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 3.75pt'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#5C676D'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#5C676D;text-decoration:none'>www.ingelmunster.be</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:3.0pt 0cm 1.5pt 0cm'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><b><span lang=NL style='color:blue'>Fout! Bestandsnaam niet opgegeven.</span></b></span><span style='font-size:11.0pt;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><b><span lang=NL style='color:blue'>Fout! Bestandsnaam niet opgegeven.</span></b></span><span style='font-size:11.0pt;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><b><span lang=NL style='color:blue'>Fout! Bestandsnaam niet opgegeven.</span></b></span><span style='font-size:11.0pt;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:1.0pt'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><b><span lang=NL style='color:blue'>Fout! Bestandsnaam niet opgegeven.</span></b></span><span style='font-size:11.0pt;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></tr></table></td></tr></table></td></tr><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:7.0pt;font-family:"Tahoma",sans-serif;color:#000001'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#000001;text-decoration:none'><span style='color:#5C676D'>Raadpleeg onze disclaimer </span></span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></td></tr></table></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>Van:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> Nyall Dawson [via OSGeo.org] [mailto:<u><span style='color:blue'>ml+s1560n5373899h69@n6.nabble.com</span></u>] <br></span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;text-decoration:none'>Verzonden:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> donderdag 9 augustus 2018 8:<u><span style='color:blue'>4</span></u>3<br></span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;text-decoration:none'>Aan:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> Reginald Carlier<br></span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;text-decoration:none'>Onderwerp:</span><span lang=NL style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'> Re: localisation of date fails in QGIS 3.2</span><span style='color:windowtext;font-weight:normal;text-decoration:none'><o:p></o:p></span></a></span></b></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>On Thu, 9 Aug 2018 at 16:39, Reginald Carlier <br><<u><span style='color:blue'>[hidden email]</span></u>> wrote: <o:p></o:p></span></a></span></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><br>> <br>> Hi Nyall, <br>> <br>> Somehow my post shows the code but my previous post doesn't. <br>> Anyway this is how the code looks: <br>> <br>> vandaag = datetime.now() <br>> dag = vandaag.day <br>> maand = vandaag.strftime("%B") <br>> jaar = vandaag.year <br>> datum = str(dag) + " " + maand + " " + str(jaar) <br>> <br>> I suspect that maybe strftime changed in python 3.6? <o:p></o:p></span></a></span></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><br>Do you see the same from a standalone python console? (I'm not sure <br>that this issue is related to QGIS at all or whether it's a Python <br>specific thing). <br><br>Nyall <br>_______________________________________________ <br>Qgis-user mailing list <br><u><span style='color:blue'>[hidden email]</span></u> <br>List info: <u><span style='color:blue'>https://lists.osgeo.org/mailman/listinfo/qgis-user</span></u><br>Unsubscribe: <u><span style='color:blue'>https://lists.osgeo.org/mailman/listinfo/qgis-user</span></u> <o:p></o:p></span></a></span></p><div class=MsoNormal align=center style='text-align:center'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><hr size=1 width="100%" noshade style='color:#CCCCCC' align=center></span></a></span></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=NL-BE style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#444444'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#444444;text-decoration:none'>If you reply to this email, your message will be added to the discussion below:</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;font-weight:normal;text-decoration:none'><o:p></o:p></span></a></span></b></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE style='font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#444444'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#444444;text-decoration:none'><u><span style='color:blue'>http://osgeo-org.1560.x6.nabble.com/localisation-of-date-fails-in-QGIS-3-2-tp5372703p5373899.html</span></u> </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></div><div style='margin-top:4.8pt'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:18.0pt'><span lang=NL-BE style='font-size:8.5pt;font-family:"Tahoma",sans-serif;color:#666666'><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:#666666;text-decoration:none'>To start a new topic under QGIS - User, email <u><span style='color:blue'>ml+s1560n4125267h77@n6.nabble.com</span></u> <br>To unsubscribe from QGIS, <u><span style='color:blue'>click here</span></u>.<br><u><span style='font-size:7.0pt;font-family:"Times New Roman",serif;color:blue'>NAML</span></u> </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p></div></div></div></div></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><br>_______________________________________________<br>Qgis-user mailing list<br><u><span style='color:blue'>Qgis-user@lists.osgeo.org</span></u><br>List info: <u><span style='color:blue'>https://lists.osgeo.org/mailman/listinfo/qgis-user</span></u><br>Unsubscribe: <u><span style='color:blue'>https://lists.osgeo.org/mailman/listinfo/qgis-user</span></u><o:p></o:p></span></a></span></p></div></div></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><br><br clear=all><br>-- <o:p></o:p></span></a></span></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=NL-BE><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>Alessandro Pasotti<br>w3:   <u><span style='color:blue'>www.itopen.it</span></u><o:p></o:p></span></a></span></p></div></div></div></div></tr></td></tr></div><p class=MsoNormal><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'><br><br clear=all><br>-- <o:p></o:p></span></a></p><div><p class=MsoNormal><a href="https://www.ingelmunster.be/" target="_blank"><span style='color:windowtext;text-decoration:none'>Alessandro Pasotti<br>w3:   <u><span style='color:blue'>www.itopen.it</span></u><o:p></o:p></span></a></p></div></div></div></blockquote></div></div></div></div></body></html>