Closed Osares10 closed 2 months ago
Hi there @Osares10 , sorry for only getting back to you at this time since I had a big exam to prepare for within the past few months. May I ask for your reason to use the old monthname
function since the month names are still in English? I'm interested if you know of some way to make it easy to use other languages for the date formatting without going down the route of constructing a long list of month names for different languages. I left the monthname
function in the code just in case someone needs different month names on an ad hoc basis (e.g. Enero for Spanish January).
I was hoping to achieve the translations eventually with Typst's built-in datetime
function while setting the lang
parameter in the text
function since it would be laborious to have translations for every requested language just for a template. There's some discussion regarding the translations in the Typst repo itself, issue #2840 but it seems to be at a standstill. It would be good to request there to let the main contributors know there's interest.
Don't be sorry, there are important things that everyone has to prioritize. I appreciate the gesture of explaining why you we're busy, but after all it's an open source project and you commented on the readme that any change would take time, so everyone should understand if you take your time to answer. But anyways, the old monthname function wasn't working for me, I really didn't know if it was working in previous versions of Typst or if it had been properly tested, because when I tried to adapt my CV to Spanish changing the names on the list didn't really have an effect, after the current modifications it behaves appropriately. Sorry if I can't elaborate more, my first language isn't English, and currently I have only my phone available to answer you.
I see, it makes sense to use the current function for now until Typst properly supports different languages. I'll go ahead and merge this if you don't have any more changes to add.
I see that makes sense to use the current function for now until Typst properly supports different languages. I'll go ahead and merge this if you don't have any more to add.
I have nothing more to add, it is exactly as you say, this will be the way to support different languages in the meantime. Thanks.
Extended the strpdate function to allow the use of the monthname function for the name of the month instead of the datetime function that only returns the month names in English.