From 50c2900b046b97a36c8f37868af4f7c9650372ea Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 15 Sep 2024 08:34:33 +0200 Subject: [PATCH] Section headers correctly change language --- cv.typ | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/cv.typ b/cv.typ index e1c5ade..5c2281e 100644 --- a/cv.typ +++ b/cv.typ @@ -71,6 +71,14 @@ [#par(item.abstract.at(lang))] } +#let sel_word_lang(de: "", en:"") = { + if lang == "de" { + de + } else { + en + } +} + #let skill_item(item: ()) = { [*#item.at(lang)*: \ ] for skill in item.content { @@ -101,7 +109,8 @@ }; if "experience" in contents { - section(title: "Professional Experience",{ + let title = sel_word_lang(en:"Professional Experience", de:"Berufserfahrung") + section(title: title, { for entry in contents.experience { work_item(item:entry) } @@ -109,7 +118,8 @@ } if "education" in contents { - section(title: "Education",{ + let title = sel_word_lang(en:"Education", de:"Ausbildung") + section(title: "Education", { for entry in contents.thesis { thesis_item(item:entry) } @@ -120,7 +130,8 @@ } if "skills" in contents { - section(title: "Qualifications",{ + let title = sel_word_lang(en:"Qualifications", de:"Qualifikationen") + section(title: "Qualifications", { for cat in contents.skills { skill_item(item:cat) } @@ -128,7 +139,6 @@ } } - #resume( yaml("content.yml") )