Localizer support

muriloq - April 25, 2007 - 21:01
Project:Node As Block
Version:5.x-1.1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

The modules i18n and localizer ( http://drupal.org/project/localizer ) aren't compatible. Is it possible to develop support for the latter one ?

#1

muriloq - April 25, 2007 - 21:51

This should do the trick (in line 130 of nodeasblock.module, just after the section that adds support to i18n-translation):

    if (module_exists('localizer')) {
       $node = node_load($delta);
       $translated_node = tobject('node', $delta,$node);
       $delta=$translated_node->nid;
    }

#2

muriloq - April 25, 2007 - 21:52

This should do the trick (in line 130 of nodeasblock.module, just after the section that adds support to i18n-translation):

    if (module_exists('localizernode')) {
        if ($trans_nid = localizernode_get_localizednid($delta,localizer_get_uilocale())){
            $delta = $trans_nid;
        }
    }

 
 

Drupal is a registered trademark of Dries Buytaert.