I'd love to use the user language as a filter for a view based search, something that's currently not possible (or am I overlooking something?)
Maybe we can use the same logic as views_handler_filter_locale_language (views/modules/locale/views_handler_filter_locale_language.inc) describes (which is used for instance on Content translation: Language field for regular translatable content).

Comments

drunken monkey’s picture

You're in luck: This is actually a part of my GSoC project, which I should come to in about two weeks.

thijsvdanker’s picture

Ahh good stuff!
Thanks for all the work sofar, lovin it :)

-otto-’s picture

subscribe

drunken monkey’s picture

Status: Active » Needs review
StatusFileSize
new3.21 KB

With the very latest dev version of Search API (containing #1237348: Add a "Language control" data alteration), the attached patch should change the Views "Item language" filter to also contain options for the user's preferred language and the site default language.

tnightingale’s picture

Patch is working well for me.
Once again posted just one day before I need it, your timing is amazing! :-)
Using it to filter based on the language the user is viewing the site in.

Thanks!

drunken monkey’s picture

Status: Needs review » Fixed

Thanks for reviewing, committed!

drunken monkey’s picture

Status: Fixed » Closed (fixed)
Issue tags: +gsoc, +gsoc2011, +gsoc2011-drunken_monkey

Tagging, and stealing work from the bot.