To be able to only the list the nodes in the same language you will have to add a line in the module.
I think it should be better to check if language row is in the database but it worked for me.
Replace :

// Create a starting-point query object
    $query = db_select('node')
      ->fields('node', array('nid'))
      ->condition('nid', $node->nid, '!=')
      ->condition('type', $node->type, '=')
      ->range(0, 1);

By :

// Create a starting-point query object
    $query = db_select('node')
      ->fields('node', array('nid'))
      ->condition('nid', $node->nid, '!=')
      ->condition('type', $node->type, '=')
      ->condition('language', $node->language, '=')
      ->range(0, 1);

If i had more time I would have tested it. But it is not the case. I'll be glad if it helps.

Comments

matiki’s picture

I'd rather change the generated links to match built-in generic pagers.

Change "first","previous","next" & "last" links at the end of flippy.module to match the example below:

  if ($nav = $vars['list']) {
    $vars['first_link'] = empty($nav['first']) ? '' : l(t('« first'), 'node/' . $nav['first']);
    $vars['previous_link'] =  empty($nav['prev']) ? '' : l(t('‹ previous'), 'node/' . $nav['prev']);
    $vars['next_link'] =  empty($nav['next']) ? '' : l(t('next ›'), 'node/' . $nav['next']);
    $vars['last_link'] =  empty($nav['last']) ? '' : l(t('last »'), 'node/' . $nav['last']);
  }
guictx’s picture

Status: Needs review » Reviewed & tested by the community

Just to confirm that the solution by @merono enables flippy to work with multilingual content types.

klim_’s picture

Status: Reviewed & tested by the community » Needs review

I've changed condition to include language neutral in flippy pagination. Here is my code:

 if (!isset($master_list[$node->nid])) {
    // Create a starting-point query object
    global $language_content; 
    $query = db_select('node')
      ->fields('node', array('nid'))
      ->condition('nid', $node->nid, '!=')
      ->condition('type', $node->type, '=')
      ->condition(db_or()->condition('language', $language_content->language, '=')->condition('language', LANGUAGE_NONE))
	  ->range(0, 1);
ilGuccino’s picture

code bi klim_ works well, but I noticed that when you open a node with language set to LANGUAGE_NONE it will show only other nodes with the same language (LANGUAGE_NONE), ie other pages in the current language won't appear, so I changed the code in this way, I hope it will save you five minutes:

if($node->language != LANGUAGE_NONE){
	    $query = db_select('node')
	      ->fields('node', array('nid', 'title'))
	      ->condition('nid', $node->nid, '!=')
	      ->condition('status', 1)
	      ->condition('type', $node->type, '=')
	      ->condition(db_or()->condition('language', $node->language, '=')->condition('language', LANGUAGE_NONE))
	      ->range(0, 1);
    }else{
	    $query = db_select('node')
	      ->fields('node', array('nid', 'title'))
	      ->condition('nid', $node->nid, '!=')
	      ->condition('status', 1)
	      ->condition('type', $node->type, '=')
	      ->condition(db_or()->condition('language', $GLOBALS['language']->language, '=')->condition('language', LANGUAGE_NONE))
	      ->range(0, 1);
    }
walidvb’s picture

Was this ever implemented?
I had to remove the condition on language on my website(I might be using locale wrong). Would be nice to include that in the documentation.
My setting is something like the following:
User setting is english, but french for anons. Multilingual support is disabled on nodes. So, it seems that the language array that node_language was being compared to was 'en' and 'und'. So it didn't work. Commenting out works, but probably not for multi lingual sites

rli’s picture

Assigned: Unassigned » rli
Issue summary: View changes
Status: Needs review » Needs work

The current version is using ->Condition('n.language', array($language->language, LANGUAGE_NONE), 'IN') which is selecting the nodes are with language undefined or using the site's language.

Need to add condition to select the nodes are using the same language as current node.

rli’s picture

Status: Needs work » Fixed

Added condition to dev.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.