Dear list,

Inspired by this question on TeX.SX 
https://tex.stackexchange.com/questions/367433

How can I get the translated names for chapter and section depending on the 
currently active language.  I know they are there in lang-txt.lua, but cannot 
be accessed via \labeltext.  One can access them through Lua but that doesn't 
seem so elegant.



\def\chaptername{%
  \ctxlua{%
    context(languages.data.labels.texts.chapter.labels["\currentlanguage"])}}

\starttext

\language[en] \chaptername

\language[de] \chaptername

\stoptext



Cheers,
Henri
___________________________________________________________________________________
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 via email to