By andrew_hoffi on
I'm working on a multilingual drupal site and its all up and running, but I've just began to create views to filter specific content types and noticed that the if I create a page using the views module there is no option to provide different paths based on the language. I've been pulling what little hair I have out for the last hour and wondered if there was an obvious answer or a solution for this?
Cheers
Andrew
Comments
I'm interested too
I'm interested too
I'd like something like "/bisses" for French and "/suonen" in German
Yes there is...
You have 2 nodes say site.com/en/chicken and site.com/es/pollo
Once you have your view sorting them in (via taxonomy, node, or content type fields) add a filter that is "Node translation: Language" and choose the option in Current user's Language. Once you have done that when viewing the view in English, you get /chicken and in Spanish you get /pollo
I'm speaking of the path of
I'm speaking of the path of the view, not of the path of the nodes.
When you create a view, display page, you give a path to that page.
Same display offers 2 languages possibilities, depending of Current user's Language, as you said.
But there is no way to give a different path for 2 languages, or if there is, I don't know how to.
Any idea?
I have not tried this
I have not tried this personally. Are you using Views 2 on Drupal 6? if so, try to add another page view and give the new view a different path?
I am not at a PC to connect to the admin of my views to verify my guess.
Good Solution for me
Thank you for your answers .Its good for me,but how could I translate the title of the view?
url alias did it
I posted also in issue in module issue queue and got back an idea :
Use Site building -> URL aliases -> Add alias . It works for me.
But i think this should be handled directly in the view, so that all paths can be managed in one place.
That's how I got around it in
That's how I got around it in the end. Thanks for the comments guys!
Thanks
Andrew
-------------------
www.hoffi.com
it's works for me too
thank's for your idea
a little complexe with a lot of views and language but it's works great.
Yto
Add Page Display
I know you found a suitable solution, but for anyone else weighing their options:
One way is to add a page display for each language.
Each page display can have its own path to meet your needs.
Each page display can filter its content with a language filter (node translation: language).
Don't use page displays
Adding a page display for each language is not the best solution, because there is no relationship between the page displays as far as locale is concerned. If you do it that way your language switcher won't work. Adding an URL alias is the right way to go.
Peacog Web Development
My solution
For correct work we need separate menu item for eac language.
So, how about creating new page(with new menu item) with PHP filter and content:
In my case
'nodes_by_type' - View name
'page_4' - needed page of the view
It worked for me.
www.yo-design.ru
Here is a small tutorial
Here is a small tutorial about how to add an alias for another language:
http://www.bariswanschers.com/blog/translating-views-paths-drupal
In my multilingual website I
In my multilingual website I have a view with this kind of URL company-search/%/products.
What about this, how can I translate it?
I tried the "small tutorial", but it didn't work in this case.
Same request
Same request for me.
Did you find any solution?
Stessa richiesta anche per me.
Hai trovato qualche soluzione?
Thanks
Views URL Path Arguments
Hi maxlife58,
I found this module https://www.drupal.org/project/path_alias_xt, but I haven't tested yet.
Probably with this you can merge the "small tutorial" and use contestual filter args into path alias.
If you'll do write a feedback.
Feedback
Hi Roberto,
I use this module on my site, It does its job well, when it comes to replace the taxonomy/term/% URLs, but unfortunately it does not work for the translations, even using the method specified in the "small tutorial", if you find some solution, please leave a comment.
Thank you
Max