jgillula / paperless-ngx-postprocessor

A powerful and customizable postprocessing script for paperless-ngx
GNU Affero General Public License v3.0
97 stars 10 forks source link

Define locale for templating #14

Open thewholelifetolearn opened 1 year ago

thewholelifetolearn commented 1 year ago

For my title, I want sometimes to use the month of the document. But when I format it, it is in English. Would it be possible to change it through an environment variable or even a variable in the ruleset?

jgillula commented 1 year ago

The code uses the Python calendar module to get month names, and the documentation for that module says it uses the current locale to generate the text names.

I think you could try changing the locale for your paperless-ngx docker container, but I'm not sure how to do that. I tried just setting the environment variables [LANG, LANGUAGE, LC_ALL] in docker-compose.env, but that didn't work. I also couldn't find anything on changing the locale in the paperless-ngx documentation. :slightly_frowning_face: