# [NTG-context] High-level command for translated names

Henri Menke henrimenke at gmail.com
Sun Apr 30 11:38:20 CEST 2017

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