Draft:Template:Article

From AbhiprayaVedi


Ver3: Fix for Category Display Names

The Malayalam DEFAULTSORT Problem

`` does NOT work correctly with Malayalam (or any Unicode script that is non-Latin). MediaWiki's sort key mechanism only reads the first Unicode code point, which is why categories were showing only the first letter/character of the title.

The Fix

Instead of using `DEFAULTSORT`, we now pass the sort key directly on each category link using the pipe syntax:

[[Category:Articles|{{{DisplayTitle|{{{Title|}}}}}}]]

This tells MediaWiki: "place this page in the category, and display it under the sort key equal to the DisplayTitle." Since MediaWiki renders the sort key as the display label in category listings, the full Malayalam title now appears correctly.

How it works

Parameter Example value
Page name Something-In-The-Air
DisplayTitle Something in the Air?
Category shows Something in the Air?

For Malayalam:

Parameter Example value
Page name Kerala-Climate-Change
DisplayTitle കേരളത്തിലെ കാലാവസ്ഥാ വ്യതിയാനം
Category shows കേരളത്തിലെ കാലാവസ്ഥാ വ്യതിയാനം