Hello there!
Maybe in this scenario it would be better to create a shim/facade function to format the dates?
from django.utils import date_format
from django.utils.translation import get_language
def date_format_basque(value):
return "something"
def my_date_format(value):
current_lang = get_language()
if current_lang == "eu" or current_lang == "eus":
return date_format_basque(value)
return date_format(value)
# using it
from django.utils import timezone
print(my_date_format(timezone.localdate()))
Let me know if this works for you, or you’re looking to something else.