Thanks Tom, but it doesn't work. The strange thing is that the first 
generation of the template is correct (en_US) but the second and subsequent 
ones are again es_ES, does the Belchertown configuration somehow prevail 
globally?. I don't understand how the first generation is correct.

El miércoles, 29 de noviembre de 2023 a las 18:16:51 UTC+1, Chuck Rhode 
escribió:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Wed, 29 Nov 2023 08:34:17 -0800
> Tom Keffer <tke...@gmail.com> wrote:
>
> > It's a bit of a hack, but one thing you could try is to put something
> > like this at the top of a template (NOT TESTED):
>
> > #import locale
> > #locale.setlocale(locale.LC_ALL, 'es_ES')
>
> > This would set the locale. It will stay set until the next call to
> > setlocale(). Note that this will set the locale for *every* time that
> > the template is used.
>
> My understanding is that the call to locale.setlocale has global
> effect and impacts all running processes, but maybe I'm misinterpreting
> the "not thread safe" warnings. The OP seems to want to run out of two
> locales simultaneously — one for FTP and one for Belchertown. So long
> as these skins are single threaded (one being complete before the other
> begins), then each can call its own locale.setlocale. I'm not sure
> how *weewxd* runs its "services" repertoire, though.
>
> - -- 
> .. Be Seeing You,
> .. Chuck Rhode, Sheboygan, WI, USA
> .. Weather: http://LacusVeris.com/WX
> .. 31° — Wind W 13 mph
>
> -----BEGIN PGP SIGNATURE-----
>
> iF0EARECAB0WIQT+MY/5I/LMPSswTbVg2/xipKOWUgUCZWdx/AAKCRBg2/xipKOW
> UqyOAJ4jbejtywEIrb6Q5Vwfb1fhVQVtQQCeKGNM4KanMdpiRvRoe1Hdpbs0xYo=
> =+cD5
> -----END PGP SIGNATURE-----
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/3bb21434-6de5-4ad7-ad29-6541288fb8ffn%40googlegroups.com.

Reply via email to