Community & Support

i18n & cloned views -> switching language doesn't switch to view in that language

Hi,

For my multilingual website I have a view of news items.
This view is filtering content by English language.

I added a link to the primairy menu to this page view, works good.

So I have cloned the view to French and Dutch and changed:

- the name of the view
- the page url page/news -> fr/page/news -> nl/page/news
- the language to filter on

I thought this way, when I change the language as visitor to the website, the view that belongs to that language would be shown but it's not.
Somehow, which is kinda logic, the language prefix is filtered so drupal isn't actually goiong to look for fr/page/news but for page/news...

So I thought I'd change the urls altogether page/news_en -> page/news_fr -> page/news_nl.
I updated the primary links to these urls and all seems well...

Unfortunately not, cause the language switching menu doesn't know that page/news_fr is the french version of page/news_en, it'll just look for
fr/page/news_en with the french prefix.

Then I came across this helpful tip: http://www.computerminds.co.uk/multilingual-views-drupal-when-using-i18n...
Basically it says one should use the insert_view module and make use of nodes in which you insert the view.

Although this is almost the perfect solution the insert_view module doesn't provide a pager: http://drupal.org/node/85769

I was hoping someone has come across this before and has a solution for it?

Thanx a million!
Bartezz

Comments

Hi again, I think I solved

Hi again,

I think I solved the problem. Instead of the insert_view module I'm using the viewfield module (http://drupal.org/project/viewfield).

I've created a node page/news in which I insert the view with the viewfield cck field then I translate this node to French and Dutch and select a different view to be inserted with the cck field. All good!

Hope this helps others! If you need more info just yell :)

Cheers

________________
Live fast die young

sweeet

Let me yell "Sweeeeeet"! Such a useful module, cant believe I missed it!

Though it seems that insert_view module NOW supports pager - http://drupal.org/node/85769

What is the difference (pros/cons) between these two modules?

Thanks

Well haven't really

Well haven't really experienced much with insert_view after I found out that it didn't include the pager. But from the top of my head... With viewfield you can set which views are allowed to be inserted and insertion is easy from a select from. With insert_view it's a macro you have to insert which makes it hard for comon users...

Correct me if I'm wrong!

Cheers

________________
Live fast die young

have you tried to add a new

have you tried to add a new filter to the view and choose from group i18n the i18n: Content negotiation ? That solves my problems :)

in D5.x?

in D5.x?

________________
Live fast die young

I know this is an old post

I know this is an old post but I was just struggling with this myself and it turns out I was able to accomplish this with just one block using "Content negotiation" as a filter and Insert View module.

I can now switch languages and the view switches to the appropriate language and path.

My only issue now is to deal with items that have not been translated. In those cases the page comes up blank. I am wondering how this can be handled. Perhaps some kind of 'argument'?

High Rock Media | Drupal | WordPress | Photography | Skype: highrockmedia | Twitter |

nobody click here