I intend to configure a document which has at least one translation. For the moment, the planned languages are English (main) and German.
For a better overview and more compact workflow, I would like to start out with translating the content (and produce the document) with the translated parts in the same .tex-file. Imho it is considerably easier to compare the content and subsequently make changes to it. But using comment-environments prevents synctex's "go to source" from working which is a truly annoying obstacle which is seemingly unavoidable.
So I found and used egreg's answer.
=> How can I disable the counting mechanism for commands such \section and \label in the environment(s) which is(are) currently not "active"? I think this environment would then mimic a comment-environment.
MWE
\documentclass[
parskip=false
]{scrartcl}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
%%ENGLISH version (main!) --- - comment out lines below for the German version!!
\usepackage[english]{babel}
\newenvironment{len}{\selectlanguage{english}}{\ignorespacesafterend}
\newenvironment{lde}{\setbox0\vbox\bgroup}
{\egroup\ignorespacesafterend}
%%make the German version - comment out lines above for the ENGLISH version!!
%\usepackage[german]{babel}
%\newenvironment{lde}{\selectlanguage{german}}{\ignorespacesafterend}
%\newenvironment{len}{\setbox0\vbox\bgroup}
%{\egroup\ignorespacesafterend}
\listfiles
\begin{document}
\begin{lde}
\section{Einige Wörter und Füllinhalte}
Abc.
Def.
\end{lde}
\begin{lde}
Mehr Worte.
\end{lde}
\begin{len}
\section{Just some words without meaning}
Abc.
Def.
Again some words to make up a sentence. Aaaa. Bbbbb. Ccccc.
HHHHHHH.
GGGGGG.
\end{len}
\begin{len}
\section{Yes, a truly bad heading}
Page 2: some words to form a sentence.
\end{len}
\begin{lde}
\section{Eine schlechte Überschrift}
Seite 2: Einige deutsche Worte.
Wieder mal ein Satz ohne Sinn. Nimmt quasi kein Ende. Und es geht so weiter, wirklich sinnfrei. Wieder mal ein Satz ohne Sinn. Nimmt quasi kein Ende. Und es geht so weiter, wirklich sinnfrei. Wieder mal ein Satz ohne Sinn. Nimmt quasi kein Ende. Und es geht so weiter, wirklich sinnfrei.
Und dann noch ein dritter Satz. Äöüi.
\end{lde}
\end{document}
ifthenseems to be just right for this. – henry May 08 '21 at 18:11