Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using the last views-6.x-3.x-dev and last i18nviews-6.x-3.x without any patch. I translated my views header in translate interface(views section), but when my views page is displayed, the translation of my views header is not handled(didn't try with footer). It was working correctly in 2.x.
PS: my nodes(title/body) and taxonomy term/description are correctly translated in views in display page and views in panels.
Comments
Comment #1
dawehnerThe translate function is called. So this seems to be a bug of i18nviews.
Perhaps you just used the preview functionality, there the text isn't translated.
Comment #2
heyyo CreditAttribution: heyyo commentedHow could I help to debug this issue ?
I change my views-view.tpl.php to add a t() around $header but nothing changed.
The title of the views page is correctly localized.
Comment #3
miro_dietikerIf you like to use the localization from i18nviews you need to switch the views settings:
Visit: admin/build/views/tools
Translation method:
- Views translation module
I just added this to the .install file in CVS. So no further confusion will occur.
Also changed the name of the Module to appear as "Internationalization Views" in views tool translation method settings.
However while testing we finally found out that the current implementation is completely broken:
#1008358: save_locale_strings produces different keys than translate_string
As soon as views 3 implements a clean API we'll update our side again.
Comment #4
heyyo CreditAttribution: heyyo commentedThanks for the update.
By using the last dev I could translate my views header now with core and Internationalization Views.
But with Internmationalization Views method, my page title and breadcrumb are not localized anymore, so for the moment I keep Core method, but I still didn't understand how we translate with Internationalization Views(without localization client of course) stil translation interface ?
Comment #5
miro_dietikerWith the translation interface.
A new text group "Views" is being defined.
Comment #6
miro_dietikerFixed a first part.
We're now awaiting the completion and commit of
#1008358: save_locale_strings produces different keys than translate_string
In a first version we won't be able to translate header, footer and empty text - because they have an attached format and views currently don't expose them as translateable.
Comment #7
datarazor CreditAttribution: datarazor commentedJust checking that my issue is the same as what is described here:
I have i18 and i18Views, I can see translation terms for the header and title when I search for terms in:
/admin/build/translate/search
I can enter a translation.
However these translations are then ignored and not displayed when I switch language on the site, it remains with the default [English] term I have typed in the header/title.
Thanks for any advice you can give on how to resolve this.
Best,
Seb.
Comment #8
datarazor CreditAttribution: datarazor commentedOk, did further testing, still can't find out why in the .module that the translation is not being called, but I can confirm that the Views title IS being translated, just NOT the header or footer of a view. I have the latest version of Views 6.x-2.12, i86 6.x-1.7 , i86Views 6.x-2.0 and Drupal 6.20.
EDIT: will this even work in version i86Views 6.x-2.0? I just noticed this bug is for 3.x-dev...?
Comment #9
miro_dietikerAmazing update.
Views 3 (Drupal 6) just committed the localization api cleanup. We're happy to see i18nviews working now.
Currently you still need to "refresh translation" (admin/build/translate/refresh) to make views translations available.
So there will be still followups for improvement.
Comment #10
miro_dietikerAt least our part is fixed then.
Comment #11
heyyo CreditAttribution: heyyo commentedGreat news ! Will try it shortly.
Comment #12
heyyo CreditAttribution: heyyo commentedI have installed the last Views and last i18nviews. I then switched to Internationalization Views in views settings for translation.
When i did a refresh for Views string in translate interface I get this error:
Comment #13
miro_dietikerYou really need latest i18nviews dev and views dev.
However in general this is a views related issue... I don't believe we're direct source of this.
Comment #14
heyyo CreditAttribution: heyyo commentedit is last dev from this morning...
Comment #15
miro_dietikerReally, rechecked, works as designed... So remains in state fixed.
Please retest in a clean drupal. Are you doing strange modifications? ;-)
Comment #16
heyyo CreditAttribution: heyyo commentedI rechecked, not on a fresh website, I have the following in /admin/reports/updates/list
Internationalization 6.x-1.7
Internationalization Views 6.x-3.x-dev (2011-janv.-15)
Views 6.x-3.x-dev (2011-janv.-19)
Do I need also dev version for Internationalization ?
I'm not a real coder, just a simple patcher :-), so nothing special in my modules...
Reported on views issues: http://drupal.org/node/1032836
Comment #17
miro_dietikerNote that if your output language is the site default language, then i18n translation is deactivated by default.
You need to enable translation layer for this specific default language.
Comment #18
heyyo CreditAttribution: heyyo commentedHow do I enable this translation layer for the specific default language ? By specifying a path(domain) prefix for this language ?
Or any other alternative(not really good for my seo)
Comment #19
miro_dietikerThis is from the inline docs, also available online: