% set default size and document class
\documentclass[12pt]{memoir}

% set paper geometry
\usepackage[a4paper,portrait,
bmargin=20mm,lmargin=20mm,rmargin=20mm,tmargin=20mm]{geometry}

% set fonts
\usepackage{fontspec}
\setmainfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}

% set languages
\usepackage{polyglossia}
\setmainlanguage{\mainlanguage}
\setotherlanguages{\otherlanguages}

% handle multiple languages

\newcommand{\ifstr}[4]{\expandafter\ifstrequal\expandafter{#1}{#2}{#3}{#4}}

\newcommand{\warn}[1]{/!\textbackslash #1 /!\textbackslash}

\newcommand{\ml}[2]{%
\ifstr{\mainlanguage}{en}{\ifstrempty{#1}{\warn{TRANSLATE ME}}{#1}}{%
\ifstr{\mainlanguage}{fr}{\ifstrempty{#2}{\warn{TRADUISEZ-MOI}}{#2}}{%
SHOULD\_NOT\_HAPPEN!%
}}%
}

\newcommand{\en}[1]{\textenglish{#1}}

\newcommand{\fr}[1]{\textfrench{#1}}
