Multilanguage's Sitemap, get_absolute_url and location

Plz help me with the correct Sitemap generation. My multilanguage site on Django 2.2 with standard internationalization framework.

Model.py with get_absolute_url

class Data(models.Model):
   ...
    def get_absolute_url(self):
        from django.urls import reverse
        return reverse("data_detail", kwargs={"slug": str(self.id)})


Sitemap.py

class DataSitemap (Sitemap):
    changefreq = "daily"
    priority = 0.5
    i18n = True

    def items(self):
        return Data.objects.all()

    def location(self, obj):
        return '/news/data/%s/' % (obj.pk)

url.py

from django.contrib.sitemaps.views import sitemap
from .sitemaps import DataSitemap

sitemaps = {
    'data'   : DataSitemap
}

urlpatterns = i18n_patterns(
   path("sitemap.xml", sitemap, {"sitemaps": sitemaps}, 
   name='django.contrib.sitemaps.views'),
)

Now when I generate sitemap.xml I get no language prefix,

<url>
   <loc>example.com/news/data/1/</loc>
     <lastmod>2022-03-24</lastmod>
     <changefreq>daily</changefreq>
   <priority>0.5</priority>
</url>
<url>
   <loc>example.com/news/data/1/</loc>
     <lastmod>2022-01-08</lastmod>
     <changefreq>daily</changefreq>
   <priority>0.5</priority>
</url>

For the other Model without with get_absolute_url but without harcoded location - everything works fine, language prefix added correctly.

How can I fix my Sitemap code?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum