Skip to content

Commit

Permalink
Merge pull request #73 from JKRhb/multilang-pdf-title
Browse files Browse the repository at this point in the history
feat: use multi-language data for PDF title
  • Loading branch information
DeveloperPaul123 authored Oct 25, 2024
2 parents 9b8327f + ed24813 commit cf472b7
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,15 @@
}

let lang_data = toml("lang.toml")

set document(
author: author.firstname + " " + author.lastname,
title: "resume",
)


show: body => context {
set document(
author: author.firstname + " " + author.lastname,
title: lflib._linguify("resume", lang: language, from: lang_data).ok,
)
body
}

set text(
font: font,
lang: language,
Expand Down Expand Up @@ -549,12 +552,15 @@
if closing == none {
closing = default-closing(lang_data)
}

set document(
author: author.firstname + " " + author.lastname,
title: "cover-letter",
)


show: body => context {
set document(
author: author.firstname + " " + author.lastname,
title: lflib._linguify("cover-letter", lang: language, from: lang_data).ok,
)
body
}

set text(
font: font,
lang: language,
Expand Down

0 comments on commit cf472b7

Please sign in to comment.