from django.utils.text import slugify as django_slugify

NORWEGIAN_TRANSLITERATIONS = str.maketrans({"æ": "ae", "ø": "o", "å": "a"})


def slugify(value: str) -> str:
    return django_slugify(value.lower().translate(NORWEGIAN_TRANSLITERATIONS))
