Untested: try specifying the exceptions first, load mainlanguage later?
Or, use \hyphenation?
Have you tested any if these?
Or, you could use multiple exception blocks...
\startexceptions[it]
Steff-en
\stopexceptions
\startexceptions[en]
Steff-en
\stopexceptions
________________________________________
Von: ntg-context im Auftrag von Steffen Wolfrum via ntg-context
Gesendet: Montag, 12. September 2022 17:11:55
An: mailing list for ConTeXt users
Cc: Steffen Wolfrum
Betreff: [NTG-context] Hyphenation in multi-language projects
Hi,
please have a look at this minimal example.
The idea is to set the hyphenation for certain words regardless of the language that is used in the surrounding paragraphs.
In this example it should stay: «steff-en»
How do i set this to all non-english paragraphs (without using \hyphenation on each language-switch)?
Best,
Steffen
—
\starttext
\setuppapersize[A6][A6]
\mainlanguage[en]
\startexceptions
steff-en
\stopexceptions
english text english text english teste: steffen
\start\language[it]
italian text italian text italian teste: steffen
\stop
\start\language[it]\hyphenation{steff-en}
italian text italian text italian teste: steffen
\stop
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________