// Add feed
$dbr = wfGetDB(DB_SLAVE);
$title = $parser->getTitle();
- $categories = $title->getParentCategories(); // e.g. 'Kategorie:Region' => 'Osttirol'
- if (array_key_exists('Kategorie:Region', $categories)) { // TODO: As this is the German name, I don't think it's working generally.
+ $categories = $title->getParentCategories(); // e.g. array('Kategorie:Region' => 'Osttirol')
+ global $wgContLang;
+ $key_region = $wgContLang->getNSText(NS_CATEGORY) . ':Region';
+ if (array_key_exists($key_region, $categories)) {
// Do we have a feed entry of the region?
// Example: select name from wrregion where page_id = 882;
$res = $dbr->select('wrregion', 'name', array('page_id' => $title->getArticleID()));