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
Comment #1
matiki commentedI'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:
Comment #2
guictx commentedJust to confirm that the solution by @merono enables flippy to work with multilingual content types.
Comment #3
klim_ commentedI've changed condition to include language neutral in flippy pagination. Here is my code:
Comment #4
ilGuccino commentedcode 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:
Comment #5
walidvb commentedWas 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
Comment #6
rliThe 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.
Comment #7
rliAdded condition to dev.