I don't understand how to get a view to display only content for the current locale.

Under Localizer settings,

* "Views global support" is checked.
* "Support for different contents types" has the right content type(s) chosen that I'm pulling with the view.

In the view, I have chosen "Localizer : activate generic support" ("is active" as options) in the filter.

But view shows all content for all languages no matter what locale I choose. Am I missing something?

Comments

patrickfgoddard’s picture

Quick update: While I await a more ideal solution, I'm grabbed the output from views wizard and wrapped a locale check:

function phptemplate_views_view_list_name_of_view($view, $nodes, $type) {
  global $locale;

  ... bunch of code ... 
  foreach ($nodes as $i => $node) {
    if ($locale == $node->localizernode_locale):
      ... bunch of code ...
      ... process and prep view item, etc....
    endif;
  }
  ... more code... 
}

Of course, this is a quick solution for one view, don't really want to do this for every view...

svihel’s picture

Im just starting with these two modules. Although I was somehow successfull to use filter you mention and it now showing only one node (not node for every translation I made), but it display wrong translation.
For example I have not yet translated all nodes, because I only trying this. All nodes is in my (czech) language and some of them are in english. When I enable localizer filter, nodes that have both translations are allways displayed only in one language. Whener I am switched in english version or czech it always shows the node in english version.

Going to continue with studying this, but for now I am kinda confused.

stamat’s picture

Hi friend,
When you want to translate an article from English to Czech language , make sure that you selected the correct language and press "Change" button inside the (Home » Administer » Content management >> Edit Story XXX). Otherwise you do not translate anything. If you have succeeded , your "story" has to be duplicated in the Content List Section(/drupal/admin/content/node).
I hope that helps.
Greetings !

svihel’s picture

Thanks for answer,
anyway I already figured out what is my problem. Its laziness :-p I presumed that localizer is just like any other module, so I didnt actually ready the install manual, which results in bad functionality, obviously.
For anyone who has problems with this module, and didnt read that yet, I would strongly recommend reading this guide - http://drupal.org/node/103419

Roberto Gerola’s picture

Status: Active » Closed (fixed)