Correct me if I'm wrong, but here is how I think it works now:

'foo' -> Quoted SingleQuote [ Str "foo" ] -> \quote{foo}
"bar" -> Quoted DoubleQuote [ Str "bar" ] -> \quotation{bar}

My suggestion is that if the language is British (and maybe for some other varieties, I haven't checked) the result should be:

'foo' -> Quoted SingleQuote [ Str "foo" ] -> \quotation{foo}
"bar" -> Quoted DoubleQuote [ Str "bar" ] -> \quote{bar}

That would avoid my problem.

But, I think it might create one for a different user. Someone might be used to typing in the US style. They then want their output to be the British style, so they change the language variable. And now they get the wrong quote marks. So maybe it's not a good idea even if its possible.

By the way, while I was thinking about this I noticed that the HTML template sets this CSS: `q { quotes: "“" "”" "‘" "’"; }`. So, it forces the US quote convention even if the language is set to British.

On Wednesday, 2 August 2023 at 20:19:15 UTC+2 Bastien DUMONT wrote:
What would the change be exactly?

Le Wednesday 02 August 2023 à 10:57:11AM, Thomas Hodgson a écrit :
> I wonder whether it would be feasible/desirable for the Context writer to
> change its mapping from DoubleQuote/SingleQuote to `\quotation`/`\quote` based
> on the language of the document? (And the same for `\enquote`/`\enquote*` for
> LaTeX.)
>
> On Wednesday, 2 August 2023 at 18:27:38 UTC+2 Thomas Hodgson wrote:
>
> Thank you.
>
> I tried this (included in my header) and I get the result I want visually
> in the PDF:
>
> ```
> \setuplanguage[en-gb][
>   leftquotation=“,
>   rightquotation=”,
>   leftquote=‘,
>   rightquote=’,
> ]
> ```
>
> On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT wrote:
>
> As you saw in the ConTeXt outputs, whatever language you set in the
> metadata, Pandoc will always identify double quotes as primary quotes
> and single quotes as secondary quotes. How they are rendered in PDF
> depends on ConTeXt. To alter the rendering of British English, you will
> need to use the macro \setuplanguage ([1]https://wiki.contextgarden.net
> /Command/setuplanguage).
>
> Le Wednesday 02 August 2023 à 07:10:40AM, Thomas Hodgson a écrit :
> > When I have a markdown file like this:
> >
> > ```
> > 'foo'
> > "bar"
> > ```
> >
> > The result of `pandoc --to=context foo.md` is `\quote{foo} \quotation
> {bar}`.
> > The result of `pandoc --to=context --output=foo.pdf foo.md` is what I
> would
> > expect: single quotes around 'foo' and double quotes around 'bar'.
> The output
> > of `pandoc --metadata=lang:en-GB --to=context foo.md` is the same.
> But, the
> > output of `pandoc --metadata=lang:en-GB --to=context --output=foo.pdf
> foo.md`
> > has double quotes around 'foo' and single quotes around 'bar'.
> >
> > I could solve this by using double quotes where I want single, and
> vice versa.
> > But that will give the wrong result for HTML from the same source.
> Also, I'm
> > sure that I would forget half the time.
> >
> > I assume that this happens because Pandoc treats the double quote as
> the 'top'
> > level of quotes, which in US English is a double quote and in UK
> English (in
> > this case, confusingly) is a single quote. I don't think it's a bug,
> therefore.
> >
> > I think that the same thing happens with csquotes and LaTeX. But
> there I don't
> > turn on csquotes.
> >
> > Is there some way to get the behaviour I want while still using
> British
> > English?
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an email
> > to [1]pandoc-discus...@googlegroups.com.
> > To view this discussion on the web visit [2][2]https://
> groups.google.com/d/msgid/
> > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%[3]
> 40googlegroups.com.
> >
> > References:
> >
> > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [2] [4]https://groups.google.com/d/msgid/pandoc-discuss/
> 6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=
> email&utm_source=footer
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to [5]pandoc-discus...@googlegroups.com.
> To view this discussion on the web visit [6]https://groups.google.com/d/msgid/
> pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com.
>
> References:
>
> [1] https://wiki.contextgarden.net/Command/setuplanguage
> [2] https://groups.google.com/d/msgid/
> [3] http://40googlegroups.com/
> [4] https://groups.google.com/d/msgid/pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=email&utm_source=footer
> [5] mailto:pandoc-discus...@googlegroups.com
> [6] https://groups.google.com/d/msgid/pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com?utm_medium=email&utm_source=footer

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1513fe42-80ad-4acd-bb53-85a04ed52a7cn%40googlegroups.com.