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

% 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{\ml}[2]{%
\ifstr{\mainlanguage}{en}{\ifstrempty{#1}{TRANSLATE\_ME!}{#1}}{%
\ifstr{\mainlanguage}{fr}{\ifstrempty{#2}{TRADUISEZ\_MOI\_!}{#2}}{%
SHOULD\_NOT\_HAPPEN!%
}}%
}

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

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