9:30
An: Reginald Carlier
Cc: qgis-user@lists.osgeo.org
Betreff: Re: [Qgis-user] localisation of date fails in QGIS 3.2
On Thu, Aug 9, 2018 at 9:23 AM, Reginald Carlier
mailto:reginald.carl...@ingelmunster.be> >
wrote:
Thanks a lot Alessandro,
That works perfectly.
Glad it he
set locale from PyQGIS
somehow though …
Hth,
Frank
Von: Qgis-user Im Auftrag von Reginald
Carlier
Gesendet: Donnerstag, 9. August 2018 08:40
An: Nyall Dawson ; 'qgis-user@lists.osgeo.org'
Betreff: Re: [Qgis-user] localisation of date fails in QGIS 3.2
Hi Nyall,
Somehow m
> [image: pinterest]
> <https://www.pinterest.com/ingelmunster/> [image: twitter]
> <https://twitter.com/ingelmunster>
> *Raadpleeg onze disclaimer *
> <http://www.ingelmunster.be/email-disclaimer.html>
> *Van:* Alessandro Pasotti [mailto:apaso...@gmail.com]
&
:10
Aan: Reginald Carlier
CC: Nyall Dawson [via OSGeo.org]; qgis-user@lists.osgeo.org
Onderwerp: Re: [Qgis-user] localisation of date fails in QGIS 3.2
Reginald,
Using QT:
locale = QLocale(QLocale.Japanese)
locale.toString(QDate.currentDate())
And, if you want to use the same settings
Reginald,
Using QT:
locale = QLocale(QLocale.Japanese)
locale.toString(QDate.currentDate())
And, if you want to use the same settings that you set in QGIS, just use
the default locale:
locale = QLocale() # Default locale from QGIS options/settings
locale.toString(QDate.currentDate())
I forgot to mention that I import datetime as follows:
from datetime import datetime
In the console I get the same result as from my script.
Maybe I should use QCoreApplication.translate or some other explicit way to
tell python to translate a string from English to Dutch?
Regards,
Reginald C
On Thu, 9 Aug 2018 at 16:39, Reginald Carlier
wrote:
>
> Hi Nyall,
>
> Somehow my post shows the code but my previous post doesn't.
> Anyway this is how the code looks:
>
> vandaag = datetime.now()
> dag = vandaag.day
> maand = vandaag.strftime("%B")
> jaar = vandaag.year
> datum = str(dag) + " "
zonden: donderdag 9 augustus 2018 8:36
Aan: Reginald Carlier
CC: qgis-user
Onderwerp: Re: [Qgis-user] localisation of date fails in QGIS 3.2
On Mon, 30 Jul 2018 at 19:22, Reginald wrote:
>
> Hi,
>
> I have a script that was adapted to python 3.6 and runs fine on QGIS 3.2.
> The probl
On Mon, 30 Jul 2018 at 19:22, Reginald wrote:
>
> Hi,
>
> I have a script that was adapted to python 3.6 and runs fine on QGIS 3.2.
> The problem I'm having is that the date shows up in english.
> Under Extra > Options > Algemeen i have:
> Vertaling gebruikers-interface --> Nederlands
> Locale Dut
Hi Reginald,
Perhaps ask the same question in the qgis-developer mailing list? You
are more likely to get an answer.
There have been quite some changes (with some side effects) on
localization introduced in QGIS 3.2. Maybe this issue is related?
Andreas
On 2018-08-09 08:14, Reginald wrote:
nobody has issues with localisation in QGIS 3.2?
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: h
11 matches
Mail list logo