ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Andres Conrado Montoya via ntg-context <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>,
	Andres Conrado Montoya <andresconrado@gmail.com>
Subject: Re: Wikfication of \commalistsentence
Date: Mon, 6 Dec 2021 22:31:53 +0100	[thread overview]
Message-ID: <64ca0e54-97b5-0db7-af47-bb2f540d163f@gmail.com> (raw)
In-Reply-To: <CAGhDZhBa_JsJyghX55jHptzY-JR2-9dXQX_=RNz5L3+cdv-VxA@mail.gmail.com>

Andres Conrado Montoya via ntg-context schrieb am 03.12.2021 um 17:25:
> I talked too soon. This won't work, and I have no idea why:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \setuplabeltext [en] [and-1={{, }}, and-2={{ and }}]    % Should be:  
> 1, 2 and 3
> \setuplabeltext [es] [and-1={{, }}, and-2={{ y }}]    % Should be: 1, 
> 2 y 3
> \setuplabeltext [de] [and-1={{, }}, and-2={{ und }}]  % Should be: 1, 
> 2 und 3
>
> \starttext
> \commalistsentence[one,two,three,four] % works as expected
>
> \language[es]
> \commalistsentence[uno,dos,tres,cuatro] % takes [en] settings
>
> \language[de]
> \commalistsentence[1,2,3,4] % takes [en] settings.
> \stoptext
> %%%%%%%%%%%%%%%%%%%%%%%%%%
>
> If I change \mainlanguage, the main language is used in all three cases.

ConTeXt uses labels dependent on the current mainlanguage, using the 
simple \language command has no effect on the label.

To change the labels for a single sentence you can put a group around 
the command and change the mainlanguage withing the group, i.e.

\start \mainlanguage[es]
\commalistsentence[...]
\stop

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2021-12-06 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 16:25 Andres Conrado Montoya via ntg-context
2021-12-06 21:31 ` Wolfgang Schuster via ntg-context [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=64ca0e54-97b5-0db7-af47-bb2f540d163f@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=andresconrado@gmail.com \
    --cc=wolfgang.schuster.lists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).