When switching the language using the built-in language switcher block of Drupal on a Views page, the language prefix in the URL changes, but the path given through Views doesn't.
E.g.: switching the language from english ( /en/all-titles ) to french, results in "/fr/all-titles" (instead of the supposed "/fr/tous-les-titres" - as configured in Views).
If this could be of any importance: I'm using the Fixed translation mode for my menu's ("Fixed Language. Menu items will have a global language and they will only show up for pages in that language." - admin/structure/menu/manage/main-menu/edit).
What could cause this kind of behaviour, and how can it be fixed?
(This issue originates form a Language switcher dropdown issue).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Page settings (English) | 39.22 KB | knalstaaf |
| #2 | Page settings (Serbian) | 39.53 KB | knalstaaf |
| #2 | Behaviour language switch on a page as configured above | 9.29 KB | knalstaaf |
Comments
Comment #0.0
knalstaaf commentedbold
Comment #0.1
knalstaaf commentedmultilingual options menu
Comment #1
dawehnerSo some of the url's of the fields aren't updated? Can you name which ones?
Comment #2
knalstaaf commentedThe paths in the Page Settings of the View aren't updated. As you can see in the attached screenshots: the path of the English page should be "/faq", and the Serbian version "/pitanja". So it's not the fields I'm after, they're working fine afaik. My apologies if this wasn't clear.
When switching the language on such a page, the language prefix changes, but the path given through the View's Page settings doesn't.
Comment #3
dawehnerWhat you actually want is another url alias for the other language. Internal urls of drupal arent' translatable. For example you will always have node/123
Comment #4
knalstaaf commentedCorrect, but it's not the internal url-system I'd like to translate.
E.g.: the website has a basic page (not created by Views) in two languages:
The language switch (upper right) handles these standard pages (nodes) perfectly. But when going to a page that's been created with Views, it doesn't seem to switch the translated path.
E.g.:
If a visitor uses the language switch to go from the Serbian FAQ to the English FAQ, the path changes from "/sr/pitanja" to "/en/pitanja", while the latter should be "/en/faq". This causes the title of the page being untranslated to English as well.
Comment #5
dawehnerWhat you actually probably need is the i18n_path module which allows you to translate paths.
The node example just works because you have different aliases for different paths.
Comment #6
knalstaaf commentedThe i18n_path module is enabled indeed.
I solved it by conducting the following actions:
This seems to be doing the job in my case (separate menu for each language). Not as easy as I expected after all.
Comment #7.0
(not verified) commentedso every language has its own menu