Add translation aids

This commit is contained in:
2025-07-14 08:50:22 +02:00
parent d824616d80
commit e005c18ea0

View File

@@ -1,4 +1,4 @@
% ▄▄█▀▀▀█▄█ % ▄▄█▀▀▀█▄█
% ▄██▀ ▀█ % ▄██▀ ▀█
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██ % ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
@@ -6,7 +6,7 @@
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀ % ██▄ ██ ██ ██ ██▀▀▀▀▀▀
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄ % ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀ % ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
% This file contains all necessary dependencies for the document to compile (at all) and some core macros % This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports % % Imports %
@@ -63,10 +63,10 @@
\newcommand{\loadLang}{ \newcommand{\loadLang}{
\ifnum\value{lang}<2{ \ifnum\value{lang}<2{
\typeout{[Lang Loader] Loaded English} \typeout{[Lang Loader] Loaded English}
}\else { }\else {
\typeout{[Lang Loader] Loaded German} \typeout{[Lang Loader] Loaded German}
\setcounter{lang}{2} \setcounter{lang}{2}
} }
\fi \fi
} }
@@ -126,6 +126,19 @@
} }
% translate the document between two languages % ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Translatation │
% ╰────────────────────────────────────────────────╯
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi} \newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
\newcommand{\tr}[2]{\translate{#1}{#2}} \newcommand{\tr}[2]{\translate{#1}{#2}}
% ┌ ┐
% │ Translation aids (commonly used) │
% └ ┘
\newcommand{\trif}{\translate{if }{falls }}
\newcommand{\trIf}{\translate{If }{Falls }}
\newcommand{\trLet}{\translate{Let }{Sei }}
\newcommand{\trLets}{\translate{Let }{Seien }}
\newcommand{\trand}{\translate{and }{und }}
\newcommand{\trwith}{\translate{with }{mit }}