Closed (outdated)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2010 at 11:16 UTC
Updated:
14 Mar 2019 at 19:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerhere is a patch for it.
Comment #2
sittard commentedThe submitted patch adds the
Node translation: Translation statusoption to the sort criteria but when selected you can sort by 'Ascending' or 'Descending' only. Which I guess is allowing me sort the language by name rather than by current user language.Thanks.
Comment #3
dawehnerAh ok, Perhaps i will time to write this handler.
Comment #4
Gerto commentedSame here; need to be able to sort by language.
Comment #5
iamjon commentedSubscribing this would be a really cool feature.
Comment #6
Vote_Sizing_Steve commentedSubscribing - would be useful for me too in listboxes used in node reference fields.
Comment #7
dawehnerIt sor'ts but the language.
Comment #8
merlinofchaos commentedCommitted to 3.x branches.
Comment #9
iamjon commentedupdating version
Comment #11
eiland commentedsorry for opening an old issue, but is it hard to backport this to views 2?
Comment #12
merlinofchaos commentedSorry, no features will be backported to Views 2; the only changes that will go into Views 2 are critical bugfixes (and even that is iffy as there are not enough people currently maintaining Views to pay attention to current stuff, let alone something old like Views 2.)
Comment #13
eiland commentedOk I understand. i changed it to a support request, as it seems that custom sort-handlers aren't soo uncommon, and i'm sure someone already has it.
Comment #14
eiland commentedNow I tested views 3 in D 6 and i understand that the patch was committed, but it s in fact not an resolving the op's question, to be able to sort by the current language.
Just to explain what is in my POV the use case:
I have nodes which can be - and are being - translated. I don't want to limit the view to displaying only translated nodes, because in some languages there are hardly any nodes, and the English ones will do, too. However, I do want the view to first display translated nodes in the current language, and then display nodes in other languages, so not mixing untranslated and translated nodes, hence sorting by (active) language.
The patch didn't provide this, it just provided sorting by language name, ignoring which is the current active language.
Comment #15
eiland commentedOkay, I'm not so much of a custom module writer, so I hacked the default 'random sort' to sort on the set language, default language and secondary, on node title. Works for me both with Views 2 and Views 3.
Be sure you don’t have a table sort on as it overrides other sort criteria.
Just backup
/sites/all/modules/views/handlers/views_handler_sort_random.incand replace it with the attached file.Comment #16
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue