* buffer-locale setting of locale for day names in time-stamps
@ 2007-09-06 15:39 William Henney
2007-09-06 18:42 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: William Henney @ 2007-09-06 15:39 UTC (permalink / raw)
To: org-mode mailing list
Hi list
I am using org mode to publish HTML pages, some of which are for an
English-speaking audience and some of which are for a Spanish-speaking
audience. Therefore, I would like the day-of-week names in the default
org time-stamps to be localised appropriately. However, the only way I
know to change the locale is with set-locale-environment, which
changes it globally. Is there any way to have buffer-local (or
file-local) setting of the locale.
I realise this is not strictly an org-mode question, but maybe some of
you know the answer...
Cheers
Will
--
Dr William Henney, Centro de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: buffer-locale setting of locale for day names in time-stamps
2007-09-06 15:39 buffer-locale setting of locale for day names in time-stamps William Henney
@ 2007-09-06 18:42 ` Bastien
2007-09-07 0:40 ` William Henney
0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2007-09-06 18:42 UTC (permalink / raw)
To: emacs-orgmode
"William Henney" <whenney@gmail.com> writes:
> Is there any way to have buffer-local (or file-local) setting of the
> locale.
What about the #+LANGUAGE option?
See (info "(Org)Export options") for details.
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: buffer-locale setting of locale for day names in time-stamps
2007-09-06 18:42 ` Bastien
@ 2007-09-07 0:40 ` William Henney
2007-09-07 8:04 ` Carsten Dominik
0 siblings, 1 reply; 5+ messages in thread
From: William Henney @ 2007-09-07 0:40 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Hi Bastien
On 9/6/07, Bastien <bzg@altern.org> wrote:
> "William Henney" <whenney@gmail.com> writes:
>
> > Is there any way to have buffer-local (or file-local) setting of the
> > locale.
>
> What about the #+LANGUAGE option?
>
Yes, I use this option. However, this value is not respected by the
time-stamps, which are implemented using format-time-string (a
built-in emacs function, written in C)
Cheers
Will
--
Dr William Henney, Centro de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: buffer-locale setting of locale for day names in time-stamps
2007-09-07 0:40 ` William Henney
@ 2007-09-07 8:04 ` Carsten Dominik
2007-09-07 15:03 ` William Henney
0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2007-09-07 8:04 UTC (permalink / raw)
To: William Henney; +Cc: emacs-orgmode
On Sep 7, 2007, at 2:40, William Henney wrote:
> Hi Bastien
>
> On 9/6/07, Bastien <bzg@altern.org> wrote:
>> "William Henney" <whenney@gmail.com> writes:
>>
>>> Is there any way to have buffer-local (or file-local) setting of the
>>> locale.
>>
>> What about the #+LANGUAGE option?
>>
>
> Yes, I use this option. However, this value is not respected by the
> time-stamps, which are implemented using format-time-string (a
> built-in emacs function, written in C)
I believe this has to do with the LANG and LC_TIME environment
variables,
but I don't know exactly what you have to set them to.
- Carsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: buffer-locale setting of locale for day names in time-stamps
2007-09-07 8:04 ` Carsten Dominik
@ 2007-09-07 15:03 ` William Henney
0 siblings, 0 replies; 5+ messages in thread
From: William Henney @ 2007-09-07 15:03 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
On 9/7/07, Carsten Dominik <dominik@science.uva.nl> wrote:
>
> On Sep 7, 2007, at 2:40, William Henney wrote:
> > On 9/6/07, Bastien <bzg@altern.org> wrote:
> >> "William Henney" <whenney@gmail.com> writes:
> >>
> >>> Is there any way to have buffer-local (or file-local) setting of the
> >>> locale.
> >>
> >> What about the #+LANGUAGE option?
> >>
> >
> > Yes, I use this option. However, this value is not respected by the
> > time-stamps, which are implemented using format-time-string (a
> > built-in emacs function, written in C)
>
> I believe this has to do with the LANG and LC_TIME environment
> variables,
> but I don't know exactly what you have to set them to.
>
OK, I think I now have a working solution. I have tracked it down to
the variable system-time-locale. However, this is a global variable,
so you have to put
(make-variable-buffer-local 'system-time-locale)
in your .emacs. Then, you can put something like this at the bottom of
an org file:
* COMMENT local variables for this file
# Local Variables:
# system-time-locale: "es_MX.ISO8859-1"
# End:
which will set the locale for that file only. After editing the local
variables, you have to do M-x normal-mode to set them for your current
session.
Thanks to Bastien and Carsten for your suggestions.
Will
--
Dr William Henney, Centro de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-09-07 15:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06 15:39 buffer-locale setting of locale for day names in time-stamps William Henney
2007-09-06 18:42 ` Bastien
2007-09-07 0:40 ` William Henney
2007-09-07 8:04 ` Carsten Dominik
2007-09-07 15:03 ` William Henney
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.