other languages
This commit is contained in:
parent
59574d623b
commit
1538172cae
3 changed files with 19 additions and 8 deletions
|
@ -4,13 +4,13 @@
|
|||
% begin document
|
||||
\begin{document}
|
||||
|
||||
\bi{}{}
|
||||
\ml{}{}
|
||||
|
||||
\bi{Hello world!}{}
|
||||
\ml{Hello world!}{}
|
||||
|
||||
\bi{}{Bonjour monde !}
|
||||
\ml{}{Bonjour monde !}
|
||||
|
||||
\bi{Hello world!}{Bonjour monde !}
|
||||
\ml{Hello world!}{Bonjour monde !}
|
||||
|
||||
% end document
|
||||
\end{document}
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
% set languages
|
||||
\setmainlanguage{\mainlanguage}
|
||||
\setotherlanguages{en,fr}
|
||||
\setotherlanguages{\otherlanguages}
|
||||
|
||||
% language commands
|
||||
\newcommand{\ifstr}[4]{\expandafter\ifstrequal\expandafter{#1}{#2}{#3}{#4}}
|
||||
|
||||
\newcommand{\bi}[2]{%
|
||||
\newcommand{\ml}[2]{%
|
||||
\ifstr{\mainlanguage}{en}{\ifstrempty{#1}{TRANSLATE\_ME!}{#1}}{%
|
||||
\ifstr{\mainlanguage}{fr}{\ifstrempty{#2}{TRADUISEZ\_MOI\_!}{#2}}{%
|
||||
SHOULD\_NOT\_HAPPEN!%
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue