From efd9dea221647aab4e49338e55b6252e15ac6f27 Mon Sep 17 00:00:00 2001
From: jee7 <raimondtunnel@hotmail.com>
Date: Mon, 20 Jan 2025 02:39:22 +0200
Subject: [PATCH] Language picking from the root file.

---
 thesis.tex | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/thesis.tex b/thesis.tex
index 430f633..367a9c0 100644
--- a/thesis.tex
+++ b/thesis.tex
@@ -1,9 +1,26 @@
 % !TEX root = thesis.tex
 
-% Valime eesti keele. Infolehel, vأµأµrsأµnades ja tsitaatides on ka inglise keel.
-%\documentclass[english,estonian]{unitartucs/thesis}
-\documentclass[estonian,english]{unitartucs/thesis}
 
-%\input{estonian/lأµputأ¶أ¶.tex}
-\input{english/thesis.tex}
+% Teretulemast Tartu أœlikooli arvutiteaduse instituudi bakalaureuse- ja magistriأµppe lأµputأ¶أ¶de malli.
+% Welcome to the University of Tartu's Institute of Computer Science's Bachelor's and Master's Thesis template.
+
+% Vali siin, kas su lأµputأ¶أ¶ on eesti vأµi inglise keeles
+% Choose here if your thesis is in Estonian or English
+
+\newcommand{\templateLanguage}{Estonian} % Eesti keeles
+%\newcommand{\templateLanguage}{English} % In English 
+
+
+% We load the correct things based on your choice
+
+\RequirePackage{ifthen}
+\ifthenelse{\equal{\templateLanguage}{Estonian}}
+    {% True case
+        \documentclass[english,estonian]{unitartucs/thesis}
+        \input{estonian/lأµputأ¶أ¶.tex}
+    }
+    {% false case
+        \documentclass[estonian,english]{unitartucs/thesis}
+        \input{english/thesis.tex}
+    }
 
-- 
GitLab