Hi @TobiOneCenobi, welcome and thank you for your question! I have changed your post’s title to bring it in line with the question guidelines and thus make it easier to understand from the title:
Good titles are questions you would ask your friend about Typst.
First of all, the basic problem you’re facing is the following:
Linguify can’t change that, but it can offer an option that requires you to provide context instead of doing that itself. I also help maintain that package, so I can give a bit of insight. The linguify()
function is defined here, and the problematic code is the following:
if from == auto or lang == auto {
// context is needed to use the default database or current language
context impl()
} else {
impl()
}
As you can see, you can work around this problem by providing the config and language explicitly, but that’s of course no fun. To support your use case (and have a github account), you could make a PR adding a parameter outside-context: false
that, when set to true
goes to the else
branch. This enables you to get actual strings from the function, at the cost of having to call it as context do-something(linguify(...))
.