Hi,
I am using the ddblock (6.x-1.0-rc6) and it works great.
Since I am modifying my site to a multi-language site I am having problems with this block because all languages are showing up in the block. Each time I translate a "News-item" both the original and the translated node are showing. For all the other menu's the site works as expected but ddblock adds a pager for each node that is available no matter which language. I went several times through all the settings and the only thing where I have my doubts is the block settings in ddblock because here it has a Multilingual settings where I have the setting to all languages. Do I have to make a new ddblock for each language? Is it not possible to show only the nodes in the language selected by the user? Or do I have to use only 1 language for the nodes and try to create translations in the strings for each input?
With friendly regards, Johan

Comments

johan2’s picture

Hi,
In order to update my issue here I have to report that the option to indicate in the "ddblock multilingual settings" the setting to 1 language is not possible because after saving it returns to all languages. This means that making a ddblock for each language is not possible.
With friendly regards, Johan

johan2’s picture

Hi,
And eventual changing text in the nodes to a different language by searching in the strings is not the good way ;-)
So the problem remains how to show only the correct pagers and not all the translated ones in the same time.

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)

Have a look at the issue http://drupal.org/node/361676.

Hope this helps you further, please let me know.

johan2’s picture

Hi Philip,
First off all thank you for the wonderful work you do.
For the ddblock I forgot to post that I read the solutions with the language filter in the view settings.
But I use ddblock without views. Having a ddblock with some newsitems did the job for me very well and it was easy to layout with some css.
I preferred to stay with the block module because it keeps things relative simple, it is only with the multilingual install that I was confronted with this issue.
I tried to figure out if it could be solved with the general multilingual settings, meaning the content selection mode, but this didn't solve it. For the moment I am able to translate the "title" and the "read more..." with the string translation, but I can not figure out where I have to add or change something in the module or the preprocess function to solve the showing off all the newsitems.
Do you have an idea?
With friendly regards, Johan

johan2’s picture

Hi,
Maybe this is nothing but I just bring it up:
I saw in some codes in order to filter out one language,
instead of:
$result = db_query("SELECT nid, title, created FROM {node} WHERE type = 'news'");
they used:
$queryResult = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.uid, u.name FROM {node} n INNER JOIN {node_revisions} r ON n.nid = r.nid INNER JOIN {users} u ON n.uid = u.uid WHERE n.type='news' ORDER BY n.created DESC"), 0, 5);

Since I saw in the ddblock module:
/**
* Get node id's and titles of nodes of a content type.
*
* @param $content_type
* Content type to get the content from.
* @return
* An array containing node id's and node titles.
*/
function _ddblock_get_content_type_nodes($content_type) {

$sql = "SELECT nid ".
"FROM {node} ".
"WHERE status=1 ".
"AND type='%s' ";
$results = db_query($sql, $content_type);

$selected_nodes = array();
while ($obj = db_fetch_object($results)) {
$node = node_load($obj->nid);
$selected_nodes[$node->nid] = check_plain($node->title);
}

return $selected_nodes;
}

I think this calls all the nodes or am I wrong?

With friendly regards, Johan

ppblaauw’s picture

As I assume you use one node for your slideshow with html code to define the slides.

Could you create this node in two languages and then create two ddblocks.
One for each language.

And then place the right block depending on language.

johan2’s picture

Hi, Philip
I have tried to set the ddblock to one language but when saving it returns to all languages.
I have read this behaviour also in another comment.
Being able to set the block to one language would solve the issue but it doesn't save.
I have made the nodes in different ways to try everything out,
1. translated nodes, original in dutch and translated to englisch
2. nodes in 1 language, not translated
3. nodes in 1 language, not translated and nodes in the other language not translated.
I didn't mix them, I did a clean setup each time. I set the language content selection mode in all modes to try out but this didn't solve it.
It would be nice if you could confirm me that it must be possible to have two blocks that are set to one language, in my case it doesn't work.
With friendly regards, Johan