Section headers correctly change language

This commit is contained in:
Marty Oehme 2024-09-15 08:34:33 +02:00
parent 0ed2aa801c
commit 50c2900b04
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

14
cv.typ
View file

@ -71,6 +71,14 @@
[#par(item.abstract.at(lang))] [#par(item.abstract.at(lang))]
} }
#let sel_word_lang(de: "", en:"") = {
if lang == "de" {
de
} else {
en
}
}
#let skill_item(item: ()) = { #let skill_item(item: ()) = {
[*#item.at(lang)*: \ ] [*#item.at(lang)*: \ ]
for skill in item.content { for skill in item.content {
@ -101,7 +109,8 @@
}; };
if "experience" in contents { 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 { for entry in contents.experience {
work_item(item:entry) work_item(item:entry)
} }
@ -109,6 +118,7 @@
} }
if "education" in contents { if "education" in contents {
let title = sel_word_lang(en:"Education", de:"Ausbildung")
section(title: "Education", { section(title: "Education", {
for entry in contents.thesis { for entry in contents.thesis {
thesis_item(item:entry) thesis_item(item:entry)
@ -120,6 +130,7 @@
} }
if "skills" in contents { if "skills" in contents {
let title = sel_word_lang(en:"Qualifications", de:"Qualifikationen")
section(title: "Qualifications", { section(title: "Qualifications", {
for cat in contents.skills { for cat in contents.skills {
skill_item(item:cat) skill_item(item:cat)
@ -128,7 +139,6 @@
} }
} }
#resume( #resume(
yaml("content.yml") yaml("content.yml")
) )