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

18
cv.typ
View file

@ -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")
)