<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sushanth Purushothama</title>
    <description>The latest articles on DEV Community by Sushanth Purushothama (@sushanthaaa).</description>
    <link>https://dev.to/sushanthaaa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3847470%2F11bc7d1f-f0b7-4848-8027-641f8bb77b0c.jpeg</url>
      <title>DEV Community: Sushanth Purushothama</title>
      <link>https://dev.to/sushanthaaa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sushanthaaa"/>
    <language>en</language>
    <item>
      <title>5 Pain Points Wagtail Users Face with Multilingual Sites</title>
      <dc:creator>Sushanth Purushothama</dc:creator>
      <pubDate>Sat, 28 Mar 2026 13:47:07 +0000</pubDate>
      <link>https://dev.to/sushanthaaa/5-pain-points-wagtail-users-face-with-multilingual-sites-mf0</link>
      <guid>https://dev.to/sushanthaaa/5-pain-points-wagtail-users-face-with-multilingual-sites-mf0</guid>
      <description>&lt;p&gt;Wagtail CMS has solid building blocks for multilingual websites. It has a &lt;code&gt;Locale&lt;/code&gt; model, &lt;code&gt;TranslatableMixin&lt;/code&gt;, and &lt;code&gt;i18n_patterns&lt;/code&gt; for URL routing. The wagtail-localize package adds translation workflows. It also supports machine translation.&lt;/p&gt;

&lt;p&gt;When I read &lt;a href="https://github.com/wagtail/wagtail/discussions/13693" rel="noopener noreferrer"&gt;Discussion #13693&lt;/a&gt;, I noticed clear patterns. Maintainers and users shared their real-world experiences with i18n. Here are the five biggest pain points.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Links That Switch Your Language
&lt;/h2&gt;

&lt;p&gt;When you call &lt;code&gt;.localized&lt;/code&gt; on a page, it should return the translated version. But if no translation exists, it returns the source-language page instead of &lt;code&gt;None&lt;/code&gt;. This causes menus and links to switch the user into a different language.&lt;/p&gt;

&lt;p&gt;Many users reported this problem. One developer wrote custom &lt;code&gt;_or_none&lt;/code&gt; methods to work around it. This should be built into Wagtail's core.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Sitemaps That Forget Other Languages
&lt;/h2&gt;

&lt;p&gt;Wagtail's sitemap generator only lists pages in the default locale. It does not add &lt;code&gt;xhtml:link&lt;/code&gt; alternate entries or &lt;code&gt;x-default&lt;/code&gt; values. This hurts SEO. Search engines can't find the translated pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Search That Only Works in One Language
&lt;/h2&gt;

&lt;p&gt;Wagtail's search backend does not support many locales. You cannot configure different NLP dictionaries for different languages. The only choice is to turn off language-specific processing. This leads to poor search results for everyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Page Tree Bugs in Wagtail-Localize
&lt;/h2&gt;

&lt;p&gt;I experienced this myself. The "Include subtree" translation feature makes child pages. However, it does not update the parent's &lt;code&gt;numchild&lt;/code&gt; metadata. This makes translated pages invisible in the admin. I reported it as &lt;a href="https://github.com/wagtail/wagtail-localize/issues/773" rel="noopener noreferrer"&gt;issue #773&lt;/a&gt; and fixed it with &lt;code&gt;Page.fix_tree()&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. No Way to Tell Source from Translation
&lt;/h2&gt;

&lt;p&gt;Wagtail's &lt;code&gt;TranslatableMixin&lt;/code&gt; doesn't show if a page is a source or a translation. The &lt;code&gt;has_translation&lt;/code&gt; attribute returns &lt;code&gt;True&lt;/code&gt; even on translated pages, which is confusing. Developers need a clear way to check if a page is the original or a translated copy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj6dpj73r3nfjreg47npt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj6dpj73r3nfjreg47npt.png" alt="Wagtail home page with language switcher" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Means
&lt;/h2&gt;

&lt;p&gt;These are not edge cases. They affect every multilingual Wagtail site. The good news is the community has clearly identified these problems. Several of them have simple solutions.&lt;/p&gt;

&lt;p&gt;I am proposing to work on fixes for items 1, 2, and 4 as part of my Google Summer of Code project. You can see my demo site at &lt;a href="https://sushanthaaa.pythonanywhere.com" rel="noopener noreferrer"&gt;sushanthaaa.pythonanywhere.com&lt;/a&gt; and the source code on &lt;a href="https://github.com/sushanthaaa/bakerydemo/tree/feature/wagtail-localize-demo" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Read my other post: &lt;a href="https://dev.to/sushanthaaa/how-i-found-a-hidden-bug-in-wagtail-localize-4eh"&gt;How I Found a Hidden Bug in Wagtail-Localize&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wagtail</category>
      <category>opensource</category>
      <category>python</category>
      <category>i18n</category>
    </item>
    <item>
      <title>How I Found a Hidden Bug in Wagtail-Localize</title>
      <dc:creator>Sushanth Purushothama</dc:creator>
      <pubDate>Sat, 28 Mar 2026 10:55:30 +0000</pubDate>
      <link>https://dev.to/sushanthaaa/how-i-found-a-hidden-bug-in-wagtail-localize-4eh</link>
      <guid>https://dev.to/sushanthaaa/how-i-found-a-hidden-bug-in-wagtail-localize-4eh</guid>
      <description>&lt;p&gt;I am working on a GSoC proposal for Wagtail CMS. As part of my preparation, I set up a multilingual demo site using &lt;a href="https://github.com/wagtail/wagtail-localize" rel="noopener noreferrer"&gt;wagtail-localize&lt;/a&gt;. I learned a lot about how Wagtail handles translations and found a bug along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Was Doing
&lt;/h2&gt;

&lt;p&gt;I extended Wagtail's &lt;a href="https://github.com/wagtail/bakerydemo" rel="noopener noreferrer"&gt;Bakery Demo&lt;/a&gt; with three languages: English, Spanish, and French. For Spanish, I translated pages one by one. For French, I used the "Include subtree" option to translate an entire section at once.&lt;/p&gt;

&lt;p&gt;The Spanish pages worked fine, but the French pages had a strange problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Went Wrong
&lt;/h2&gt;

&lt;p&gt;After translating the French subtree, I could not see any child pages in the admin panel. The pages existed in the database. They had content. But the admin explorer showed nothing under the French homepage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh0z0bakfpccbftfvx1nf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh0z0bakfpccbftfvx1nf.png" alt="Wagtail Admin Explorer - Showing nothing" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I got "Page not found" errors when I visited the child page URLs directly, even though the pages exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Diagnosed It
&lt;/h2&gt;

&lt;p&gt;I wrote a small script to check the page tree data. Every Wagtail page stores a field called &lt;code&gt;numchild&lt;/code&gt;. This tells the admin how many children a page has. If &lt;code&gt;numchild&lt;/code&gt; is zero, the admin skips the database query to find children.&lt;/p&gt;

&lt;p&gt;The French homepage had &lt;code&gt;numchild = 0&lt;/code&gt;, even though it had several child pages. The "Include subtree" translation made the child pages but didn't update the parent's counter.&lt;/p&gt;

&lt;p&gt;This happens because wagtail-localize uses &lt;a href="https://github.com/django-treebeard/django-treebeard" rel="noopener noreferrer"&gt;django-treebeard&lt;/a&gt; to manage the page tree. When it makes many pages at once during subtree translation, it skips updating &lt;code&gt;numchild&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Fixed It
&lt;/h2&gt;

&lt;p&gt;The fix was simple. I ran one command in the Django shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;wagtail.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Page&lt;/span&gt;
&lt;span class="n"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fix_tree&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This rebuilt the tree metadata. All French child pages showed up in the admin and loaded fine on the frontend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl3emiz11892n7x2ry4pu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl3emiz11892n7x2ry4pu.png" alt="Wagtail Admin Explorer - Showing all French child pages" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Translation tools can have subtle data bugs.&lt;/strong&gt; The pages were created correctly, but the metadata was wrong. This kind of bug is hard to spot because everything looks fine until you check the admin explorer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;numchild&lt;/code&gt; is critical for Wagtail's page tree.&lt;/strong&gt; It controls whether the admin even tries to find child pages. A wrong value makes pages invisible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bulk operations need extra care.&lt;/strong&gt; When you create many pages at once, update all related metadata too. It's not enough to just update the pages.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I reported this as &lt;a href="https://github.com/wagtail/wagtail-localize/issues/773" rel="noopener noreferrer"&gt;issue #773&lt;/a&gt; in wagtail-localize. The bug is still open and needs a permanent fix in the package.&lt;/p&gt;

&lt;p&gt;If you use wagtail-localize's subtree translation feature, watch out for this. Running &lt;code&gt;Page.fix_tree()&lt;/code&gt; is a good workaround until the fix is merged.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Check out my multilingual demo: &lt;a href="https://sushanthaaa.pythonanywhere.com" rel="noopener noreferrer"&gt;sushanthaaa.pythonanywhere.com&lt;/a&gt; | &lt;a href="https://github.com/sushanthaaa/bakerydemo/tree/feature/wagtail-localize-demo" rel="noopener noreferrer"&gt;Source code&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wagtail</category>
      <category>opensource</category>
      <category>python</category>
      <category>i18n</category>
    </item>
  </channel>
</rss>
