tabularray
tabularray copied to clipboard
Make contfoot-text and conthead-text language aware
Currently, the caption label correctly responds to a language loaded via babel
or polyglossia
. Unfortunately, the text corresponding to contfoot-text
and conthead-text
is hard coded to the english version. While one can easily adjust the text to ones preferences using \DefTblrTemplate
, I nevertheless wonder if it would be possible to also make this text language aware by automatically adjusting the text depending on the language provided?
\documentclass{article}
\usepackage[ngerman]{babel}
%\usepackage{polyglossia}
%\setmainlanguage{german}
\usepackage{tabularray}
\begin{document}
\vspace*{16cm}
\begin{longtblr}[caption={Text}]{}
\hline
first column & second column & third column & last column \\
first column & second column & third column & last column \\
first column & second column & third column & last column \\
first column & second column & third column & last column \\
\hline
\end{longtblr}
\end{document}
I can not speak other languages. So I need help from you and other users. Please write down your translations here. When there are enough translations, I will add them to the package.
@lvjr Where to contribute the translations to other languages of the required words?
@DAbidou Just write your translations in a comment of this issue.
rather than add lots of language options to this package it (might) be more flexible to just add some indirection here using the standard \...name
convention so rather than directly using { Continued ~ on ~ next ~ page }
use { \continuednextpagename }
with the macro defined with the English text then any babel language or document preamble can add a localised definition of this command this to the babelextras mechanism \addtoextrasrussian{\renewcommand\continuednextpagename{whatever}}
@davidcarlisle Do you mean that I only need to define two macros and let babel
package do the translations?
@lvjr yes apart from keeping your package less cluttered (you could end up with a lot of language code if you start adding some) it ends up with a better interface for the user. Consider two-language documents. you (might) want the "next page" language to change according to the current language. If the switch is handled by babel there are already existing mechanisms for the document markup for a small inline language switch that doesn't change the fixed texts or larger block language switches that do chnage these macros.
Initially of course your new \zzzname
macros will not be in the default language definition files but they can be added if they prove popular and meanwhile babel offers a standard mechansim via the ..extras.. hooks so that document authors can add localised variants that switch at the right places.
I can not find \addtoextrasrussian
in babel
documentation. I think it should be \addto\extrasrussian
.
that's what David meant.
yes sorry, as you said.
On Wed, 29 Dec 2021 at 15:26, Frank Mittelbach @.***> wrote:
that's what David meant.
I think \tblrcontheadname
and \tblrcontfootname
are the proper macro names. And I will add them later.