3

I am making a long table using the tabularray package. The text is written in Brazilian Portuguese, as the MWE shows. How do I change the output language from English to Portuguese?

\documentclass[%
brazilian,%                 
a4paper,%                   
oneside,%                   
12pt%                           
]{book}%                        
%
\usepackage[brazilian]{babel}%  I   
\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage{tabularray} 

\begin{document}
\begin{longtblr}[%
caption={Caption in portuguese},
label={tab:tab}
]{%
colspec={X[c,m]X[c,m]X[c,m]X[c,m]},
rowhead = 2
}
\hline
\SetCell[c=2]{c,m} \textbf{Amostras} & &\SetCell[r=2]{c,m} \textbf{Valor p ajustado} & \SetCell[r=2]{c,m} \textbf{Significância ($\mathbf{p<0,05}$)} \\
\hline
\textbf{Grupo 1}                     & \textbf{Grupo 2} &                            &                                                               \\
\hline
Amostra 1         & Amostra 2         & 0,994                                      & ns                                               \\
Amostra 1         & Amostra 3         & 1                                          & ns                                               \\
Amostra 1         & Amostra 4         & 1                                          & ns                                               \\
Amostra 1         & Amostra 5         & 0,77                                       & ns                                               \\
Amostra 1         & Amostra 6         & 0,296                                      & ns                                               \\
Amostra 1         & Amostra 7         & 0,0635                                     & ns                                               \\
Amostra 1         & Amostra 8         & 0,583                                      & ns                                               \\
Amostra 1         & Amostra 9         & 0,946                                      & ns                                               \\
Amostra 1         & Amostra 10        & 0,695                                      & ns                                               \\
Amostra 2         & Amostra 3         & 0,998                                      & ns                                               \\
Amostra 2         & Amostra 4         & 1                                          & ns                                               \\
Amostra 2         & Amostra 5         & 0,998                                      & ns                                               \\
Amostra 2         & Amostra 6         & 0,814                                      & ns                                               \\
Amostra 2         & Amostra 7         & 0,325                                      & ns                                               \\
Amostra 2         & Amostra 8         & 0,977                                      & ns                                               \\
Amostra 2         & Amostra 9         & 1                                          & ns                                               \\
Amostra 2         & Amostra 10        & 0,993                                      & ns                                               \\
Amostra 3         & Amostra 4         & 1                                          & ns                                               \\
Amostra 3         & Amostra 5         & 0,844                                      & ns                                               \\
Amostra 3         & Amostra 6         & 0,367                                      & ns                                               \\
Amostra 3         & Amostra 7         & 0,0847                                     & ns                                               \\
Amostra 3         & Amostra 8         & 0,672                                      & ns                                               \\
Amostra 3         & Amostra 9         & 0,974                                      & ns                                               \\
Amostra 3         & Amostra 10        & 0,778                                      & ns                                               \\
Amostra 4         & Amostra 5         & 0,953                                      & ns                                               \\
Amostra 4         & Amostra 6         & 0,552                                      & ns                                               \\
Amostra 4         & Amostra 7         & 0,155                                      & ns                                               \\
Amostra 4         & Amostra 8         & 0,847                                      & ns                                               \\
Amostra 4         & Amostra 9         & 0,997                                      & ns                                               \\
Amostra 4         & Amostra 10        & 0,918                                      & ns                                               \\
Amostra 5         & Amostra 6         & 0,997                                      & ns                                               \\
Amostra 5         & Amostra 7         & 0,784                                      & ns                                               \\
Amostra 5         & Amostra 8         & 1                                          & ns                                               \\
Amostra 5         & Amostra 9         & 1                                          & ns                                               \\
Amostra 5         & Amostra 10        & 1                                          & ns                                               \\
Amostra 6         & Amostra 7         & 0,996                                      & ns                                               \\
Amostra 6         & Amostra 8         & 1                                          & ns                                               \\
Amostra 6         & Amostra 9         & 0,948                                      & ns                                               \\
Amostra 6         & Amostra 10        & 0,999                                      & ns                                               \\
Amostra 7         & Amostra 8         & 0,92                                       & ns                                               \\
Amostra 7         & Amostra 9         & 0,526                                      & ns                                               \\
Amostra 7         & Amostra 10        & 0,85                                       & ns                                               \\
Amostra 8         & Amostra 9         & 0,999                                      & ns                                               \\
Amostra 8         & Amostra 10        & 1                                          & ns                                               \\
Amostra 9         & Amostra 10        & 1                                          & ns                                               \\ \hline
\end{longtblr}
\end{document}

Output in English

enter image description hereenter image description here

2
  • 2
    The package manual mentions the keys contfoot-text and conthead-text which you could use in order to translate the text yourself.
    – leandriis
    Commented Dec 25, 2021 at 16:31
  • 1
    On tabularray's github, you can find a feature request to make contfoot-text and conthead-text language aware. Maybe you would like to consider submitting your translation to Brazilian Portuguese there.
    – leandriis
    Commented Dec 28, 2021 at 13:40

2 Answers 2

10
\DefTblrTemplate{contfoot-text}{default}{Continuado na próxima página}
\DefTblrTemplate{conthead-text}{default}{(Continuado)}

enter image description here

1
1

For further reference in the broad topic of babel and tabularray support:

With tblr-extras you can use the babel library to automatic change the output of those strings to the babel language (doesn't support multiple languages currently).

Right now it supports spanish, ngerman and french but the upcoming update includes portuguese and italian support.

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{tabularray,tblr-extras}
\UseTblrLibrary{babel}
\begin{document}
\begin{longtblr}[%
caption={Caption in portuguese},
label={tab:tab}
]{%
colspec={X[c,m]X[c,m]X[c,m]X[c,m]},
rowhead = 2
}
\hline
\SetCell[c=2]{c,m} \textbf{Amostras} & &\SetCell[r=2]{c,m} \textbf{Valor p ajustado} & \SetCell[r=2]{c,m} \textbf{Significância ($\mathbf{p<0,05}$)} \\
\hline
\textbf{Grupo 1}                     & \textbf{Grupo 2} &                            &                                                               \\
\hline
Amostra 1         & Amostra 2         & 0,994                                      & ns                                               \\
Amostra 1         & Amostra 3         & 1                                          & ns                                               \\
Amostra 1         & Amostra 4         & 1                                          & ns                                               \\
Amostra 1         & Amostra 5         & 0,77                                       & ns                                               \\
Amostra 1         & Amostra 6         & 0,296                                      & ns                                               \\
Amostra 1         & Amostra 7         & 0,0635                                     & ns                                               \\
Amostra 1         & Amostra 8         & 0,583                                      & ns                                               \\
Amostra 1         & Amostra 9         & 0,946                                      & ns                                               \\
Amostra 1         & Amostra 10        & 0,695                                      & ns                                               \\
Amostra 2         & Amostra 3         & 0,998                                      & ns                                               \\
Amostra 2         & Amostra 4         & 1                                          & ns                                               \\
Amostra 2         & Amostra 5         & 0,998                                      & ns                                               \\
Amostra 2         & Amostra 6         & 0,814                                      & ns                                               \\
Amostra 2         & Amostra 7         & 0,325                                      & ns                                               \\
Amostra 2         & Amostra 8         & 0,977                                      & ns                                               \\
Amostra 2         & Amostra 9         & 1                                          & ns                                               \\
Amostra 2         & Amostra 10        & 0,993                                      & ns                                               \\
Amostra 3         & Amostra 4         & 1                                          & ns                                               \\
Amostra 3         & Amostra 5         & 0,844                                      & ns                                               \\
Amostra 3         & Amostra 6         & 0,367                                      & ns                                               \\
Amostra 3         & Amostra 7         & 0,0847                                     & ns                                               \\
Amostra 3         & Amostra 8         & 0,672                                      & ns                                               \\
Amostra 3         & Amostra 9         & 0,974                                      & ns                                               \\
Amostra 3         & Amostra 10        & 0,778                                      & ns                                               \\
Amostra 4         & Amostra 5         & 0,953                                      & ns                                               \\
Amostra 4         & Amostra 6         & 0,552                                      & ns                                               \\
Amostra 4         & Amostra 7         & 0,155                                      & ns                                               \\
Amostra 4         & Amostra 8         & 0,847                                      & ns                                               \\
Amostra 4         & Amostra 9         & 0,997                                      & ns                                               \\
Amostra 4         & Amostra 10        & 0,918                                      & ns                                               \\
Amostra 5         & Amostra 6         & 0,997                                      & ns                                               \\
Amostra 5         & Amostra 7         & 0,784                                      & ns                                               \\
Amostra 5         & Amostra 8         & 1                                          & ns                                               \\
Amostra 5         & Amostra 9         & 1                                          & ns                                               \\
Amostra 5         & Amostra 10        & 1                                          & ns                                               \\
Amostra 6         & Amostra 7         & 0,996                                      & ns                                               \\
Amostra 6         & Amostra 8         & 1                                          & ns                                               \\
Amostra 6         & Amostra 9         & 0,948                                      & ns                                               \\
Amostra 6         & Amostra 10        & 0,999                                      & ns                                               \\
Amostra 7         & Amostra 8         & 0,92                                       & ns                                               \\
Amostra 7         & Amostra 9         & 0,526                                      & ns                                               \\
Amostra 7         & Amostra 10        & 0,85                                       & ns                                               \\
Amostra 8         & Amostra 9         & 0,999                                      & ns                                               \\
Amostra 8         & Amostra 10        & 1                                          & ns                                               \\
Amostra 9         & Amostra 10        & 1                                          & ns                                               \\ \hline
\end{longtblr}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .