Patch allows one to filter terms by their language.

CommentFileSizeAuthor
taxonomy-language-views.patch2.66 KBamitaibu

Comments

jose reyero’s picture

Project: Internationalization » Internationalization Views
Version: 7.x-1.x-dev » 7.x-3.x-dev
Component: Taxonomy » Code

This should be for i18n views module.

dawehner’s picture

Status: Needs review » Needs work

And there it needs some work at lesat

+++ b/i18n_taxonomy/views/i18n_taxonomy_handler_filter_language.incundefined
@@ -0,0 +1,18 @@
+class i18n_taxonomy_handler_filter_language extends views_handler_filter_in_operator {
+  function get_value_options() {
+    if (!isset($this->value_options)) {
+      $this->value_title = t('Language');
+      $languages = array(
+        '***CURRENT_LANGUAGE***' => t("Current user's language"),
+        '***DEFAULT_LANGUAGE***' => t("Default site language"),
+        LANGUAGE_NONE => t('No language')
+      );
+      $languages = array_merge($languages, locale_language_list());
+      $this->value_options = $languages;

Couldn't you use views_handler_filter_locale_language here?

dawehner’s picture

You don't even need locale module or translation module to have one of this handlers because they are included via the drupal registry.

dawehner’s picture

Status: Needs work » Closed (works as designed)

And there you already see

  $data['taxonomy_term_data']['language'] = array(

Sorry for your effort :(

amitaibu’s picture

Oh, wasn't subscribed to this. Thanks guys.