The problem is, that I have a multilang website English and Serbian

The source language is Serbian, and the global meta tag is:
[current-page:title] | [site:name]

When I switch language on the site, the title(meta) is still displayed as original.

This just happens on the view, on the basic page it is ok.

Example:
www.vinarijazvonkobogdan.com/vesti
www.vinarijazvonkobogdan.com/en/news

CommentFileSizeAuthor
#8 view-translation-en.PNG61.67 KBpminf
#8 view-title-en.PNG22.93 KBpminf

Comments

malatenszki created an issue. See original summary.

malatenszki’s picture

Issue summary: View changes
damienmckenna’s picture

Component: Code » Multilingual/intl
Issue tags: -current page title, -translate, -view +i18n, +Needs tests

I'm sorry you're having this problem.

I presume that example page is a Views page?

damienmckenna’s picture

I think the first step is to confirm exactly what you're trying to do, then write a test that mirrors that process, and then fix any bugs that show up for it.

damienmckenna’s picture

Assigned: malatenszki » Unassigned
malatenszki’s picture

Status: Active » Fixed
flocondetoile’s picture

Status: Fixed » Active

Malatenszki,

Have you fixed this issue on views page ?

I experienced same issue too ? Could you share your feedback ?

pminf’s picture

StatusFileSize
new22.93 KB
new61.67 KB

I can confirm this. Steps to reproduce:

  1. Install Drupal with standard language other then English (e.g. German)
  2. Install moduls Token, Meta Tags and Configuration Translation
  3. Create new content view with page
  4. Translate this view and change display title: View translation
  5. Go to views page and switch language. The headline is translated according to the view translation but not the html title: view page

@flocondetoile: Are you working on this? Otherwise please change status to Unassigned.

noximuz’s picture

Same issue here when using Drupal (8.3.2) Book pages in multilang site with metateg module. Any solution yet?

roam2345’s picture

The simplest work around for me to fix this is to do the folllowing.
- Enable the metatag views module.
- Then override the metatag for the view with "[view:title] | [site:name]" or what ever your pattern is.

vegardjo’s picture

I'm having the same issue with Panel pages, the title was translated till I enabled Metatag module, then it fell back to the original title for both languages. As I only needed Metatag to change the title for user entities what worked for me here was removing the title token entirely from the global settings.

kostask’s picture

I am experiencing the same issue with views in non English default language and metatags.

The solution proposed by lathan (Enable metatag views module & override defaults on the view) fixes the problem.

Digging a little bit on the code I found that the untranslated page title is being overriden by metatag_preprocess_html() where the title is being set by the result of metatag_get_tags_from_route() which returns the untranslated original views title.

5n00py’s picture

Status: Active » Closed (duplicate)
Related issues: +#2716019: View titles in breadcrumb and metatag title don't get properly translated

After investigation I found main issue:
#2716019: View titles in breadcrumb and metatag title don't get properly translated

Last patch from original issue also fixes this one.