I have a over 5000 pages multilingual site that was correctly configured, nodes, blocks & views were all showing its own translation.

But I discovered today that blocks and views are not displaying its translations anymore, only source.
I tripled checked the parameters below, and searched in all admin menus where something could be wrong:

  • the correct translatable text formats are checked
  • the User interface text language detection weren't changed :
    • first by URL ( language prefix)
    • then user
    • browser
    • default.

If I try to update my translations, they are still here, saved in the database, but they don't show up !?!

I then updated related modules : config is now :

  • core 7.18
  • i18n 7.x-1.8
  • Entity Translation 7.x-1.0-beta2
  • Views 7.x-3.7
  • Views translation 7.x-3.x-dev

No result.

I could neither find any watchdog message related to that problem.

Where could I search now ? Any help is really welcome.

Comments

Kojo Unsui’s picture

Since I asked, I updated core to 7.22 and all modules to their last release.

Then I created a test block and translated it : same behaviour, translations are saved but nor displayed :(

sethulakshmy’s picture

But for me, all translations are showing at a time with the above said configs. This happened when i updated the i18n from 1.3 to 1.8, so I reverted back to 1.3. I didn't get any error messages as well. I also want to install entity API module which is not compatible with i18n 1.3. Any idea??

Kojo Unsui’s picture

It seems we are not in the same situation ?
I already had i18n 1.7 + entity API since the beginning, and something else caused that silent bug.
Unfortunately last weeks I 've been working fast, and I can't exclude that I updated one or another module, so I 'm trying to revert the most concerned ones.

It would be great to know where in the database are the fields that control blocks & views translations, something like node tnid i.e...
And also where to put some watchdogs in i18n to track the place the error occurs...

Diane Bryan’s picture

I have to echo this. Our site was working beautifully with blocks and menus in different languages. Suddenly, for views blocks and menus, the language is not recognized, so nothing displays. We tested by specifying that a language-specific (Dutch) views block appear only on a specific test node. Voilà--it was there, and its pager functioned perfectly. So the view is functioning, but the language recognition is not happening, seemingly at the page level. When resetting the same views block to appear on only the language-specific pages, no-show.

Node translations appear to be working, but I can't access them except via the "Translate" tab.

Can't go live with translations until this is solved. Happy to work on a patch if anybody can point us in the right direction.

Multilingual Modules we have active:

Locale 7.22
Content Translation 7.22

i18n v7x-1.8
Block languages v7x-1.8
Menu translation v7x-1.8
Multilingual content v7x-1.8
String translation v7x-1.8
Translation sets v7x-1.8
Variable translation v7x-1.8

Language Switcher Dropdown installed but not enabled.

Other modules concerned:
Free Pager
Om Maximenu
Views and Views UI v7.x-3.7

Jose Reyero’s picture

As I understand, this is likely to be caused by some module update. Some tips:
- It would be useful to know for each case which modules/versions you were using before and after.
- For blocks not translated the function to check is i18n_block_view_alter()
- For blocks not showing up, it is i18n_block_block_list_alter()

skyredwang’s picture

dafeder’s picture

I am having this problem with views blocks, but not other kinds of blocks. If I override the views title, I can translate it. It looks like this is a problem with the i18n Views module specifically, to me.

Kojo Unsui’s picture

Not in my case : the problem really occurs with views blocks AND blocks.

All the fields that were translated either with translation block options, or with Views translation into the views interface, show up in the default language.

So in case of simple blocks, to limit disaster, I created for most of them a translated version to display only in the target language. But it's heavy, I can't do that for most of my views blocks... and this doesn't solve the bug.

What do you mean by "If I override the views title, I can translate it." ?

Kojo Unsui’s picture

@skyredwang in #6, I tried :
Ctools: 7.x-1.2, 7.x-1.3, 7.x-1.3+4-dev
Internationalization 7.x-1.7, 7.x-1.8, 7.x-1.10
(I don't have Panels installed)

No result :-(

dafeder’s picture

Thierry - if I configure the block and give it a title that overrides the title it's getting from the view, I can translate it as I could any other block with i18n.

Kojo Unsui’s picture

Dafeder thanks, but unfortunately, as I explained, both views and blocks translations are bugged. So no matter if I overwrite a view title or whatever.

dnlt’s picture

I don't know if it could be related, but I've found that, when you alter the origin for a translation (i.e. a field rewriting), the old translation record at i18n_strings table remains there, causing the new translation to be "invisible" for the system, as it first finds the old one.

dafeder’s picture

I'm no longer sure about this bug, because I seem to have one block that is translating. Consider my report withdrawn for now...

hwasem’s picture

Issue summary: View changes

Thank you, dafeder, for #10. That finally worked for me with my Views blocks.

From blocks, I selected "Configure" for my block. I gave the block a title there (not in views). Under the Languages tab at the bottom, I selected " Make this block translatable". Then clicked "Save and Translate".

Now under Spanish, I clicked "translate". The Title field was finally ediable. Up until them, it would display, but was not an editable field. Very strange.

I'm using:
Drupal 7.26
Internationalization 7.x-1.10
Chaos tools 7.x-1.4 (updated today)

I use Display Suite, not panels.

wizonesolutions’s picture

I'm experiencing the same thing. Translating the View simply doesn't work. The translations aren't used. The block title workaround works, but I need in-View content to use the translations as well.

Jose Reyero’s picture

Priority: Major » Normal
Status: Active » Closed (works as designed)

So it seems:
- Views blocks (as any other module's block), generate their own title. We don't touch it unless it is overridden.
- Once you override a block title, i18n allows translating it.

This is just how it is supposed to work, you can add it to this module's ducumentation...

About views content, that should be handled by i18nviews, a different module.

wizonesolutions’s picture

Jose Reyero: Yeah, this is right. I think there is already a corresponding issue in i18nviews. The root problem was the localization plugin that Views itself uses for Views in code (it forces the Core plugin). There's a patch to make it use Internationalization Views for all of them, which I applied and which worked.

Kojo Unsui’s picture

wizonesolutions, could you please share the issue link you're talking about in #17 ?

wizonesolutions’s picture

#2245917: Exported views do not include t() translatables. See the first related issue as well.