Locale (i18n) support?

surge_martin - June 29, 2006 - 14:53
Project:Recent Blocks
Version:4.7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Currently this module only seems to work in the default language. Any way it could be made locale-aware, so that it would only show nodes in the current locale?

#1

surge_martin - June 29, 2006 - 18:47

The site I'm working on doesn't use comments, so I simplified the query in the _recent_blocks_block function, and now it works in multiple languages:

$sql = "SELECT n.nid, n.title, n.uid, n.changed, n.changed AS last_change".
" FROM {node} n".
" WHERE $common_where AND $wow_comments".
" AND n.promote = 1".
" ORDER BY $s[mode_full_sort] DESC";

(note that as per my other message, http://drupal.org/node/71441 , I wanted to be able to restrict the listing to front page items)

The cool thing is that now the client can specify different content to be featured, depending on the language.

 
 

Drupal is a registered trademark of Dries Buytaert.