sinaatalay / rendercv

A LaTeX CV/Resume Framework
http://docs.rendercv.com
MIT License
683 stars 60 forks source link

TODAY placeholder not localized #111

Open rakete1 opened 3 weeks ago

rakete1 commented 3 weeks ago

The placeholder TODAY in "last_updated_date_style" is always replaced by Date.today().strftime("%B %Y"). As it is not possible to call the setlocale function (see https://docs.python.org/3/library/locale.html) this funtions always returns an English string like "June 2024". However it would be great if I could control the locale that is used via the yaml file so that this language matches my locale_catalog in the yaml. Currently in the header it says for me now: "Zuletzt aktualisiert: June 2024" whereas the rest of the document and the dates are translated to German language by using my own locale_catalog.

sinaatalay commented 3 weeks ago

Thank you for finding this! It will be available in the next release.

rakete1 commented 3 weeks ago

Yea. Sure. Happy you plan to integrate it! Maybe there is a different or more elegant way as to call the setlocale function. I'm not sure. But I'm confident you will find a good way. I love your framework. Thank you for the great work!

sinaatalay commented 3 weeks ago

I like the full control over the PDF via the YAML file, so I ended up adding a new field to the locale_catalog field: full_names_of_months. From now on, it will pull TODAY's month name from there.

If you would like to test it, you can install RenderCV from the latest commit with the command below:

pip install "rendercv@git+https://github.com/sinaatalay/rendercv"
rakete1 commented 3 weeks ago

Yea. Thats really consistent with the other options. I like it! Test was successful. Thanks again!