Posted by zmove on August 28, 2008 at 10:13am
Jump to:
| Project: | Internationalization |
| Version: | 6.x-1.x-dev |
| Component: | Blocks |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi,
I'm happy to see a view module for internationalization. For most site, lot of contents are generated by views, and it was a pain to translate. I hope this module will make our life more easy.
However there is a problem with the views title, especially the one generated with arguments like taxonomy_term view.
I translated my taxonomy via the locale system. When I go into a node, I can see the right translation of my term, but when I browse my node listing with taxonomy_term views, all the titles are in english (the default language), so they are not translated.
It could be very usefull to get the correct language for the title when a term is translated...
thanks
zmove
Comments
#1
I finally found the solution :
in argument.handler.inc
Replace
<?phpfunction get_title() {
if (isset($this->validated_title)) {
return $this->validated_title;
}
else {
return $this->title();
}
}
?>
By:
<?phpfunction get_title() {
if (isset($this->validated_title)) {
return t($this->validated_title);
}
else {
return t($this->title());
}
}
?>
And then, your title will become translatable viia the locale system.
#2
Duplicate of #64004: Integration of i18n and views.module = fix translatablity of views.
#3
View titles are indeed translated but still taxonomy views titles (taxonomy_term) are not
I am testing with the dev of i18n and the 2.x dev of CCK and 2.x dev of views
anybody else experiencing the same ?
#4
can we consider this a bug
#5
temp solution until this is sorted
include in the header of your taxonomy_term view
<?phpdrupal_set_title(t(drupal_get_title()));
?>
input format: php
#6
subscribe
#7
The header modification of #5 works great.
But does anyone have a solution to translate the breadcrumbs, and the taxonomy term that appears under each teaser or full node?
#8
Thanks for solution #5!
#9
Fixed with #360024: Write views localization plugin
But needs this views patch #357529: Implement translation of customized 'translatable' views properties
#10
Automatically closed -- issue fixed for 2 weeks with no activity.
#11
Thanks for solution #5!
And looking forward to the patch in #9 to be included in an official release.
#12
Add this in the view header, and set input type to php code:
<?phpdrupal_set_title(tt('taxonomy:term:'. arg(2) .':name', drupal_get_title()));
?>
#13
how do you add that code in the view using views 3.0? thank you very much!
#14
#5 and #12 don't work
I've always title in french.
subscribe
#15
#14
Put english as your default language
and translate to french
make sure the string become translatable by visiting page in french or refreshing the strings
#16
Is it dangerous to change the default language on a production site?
#17
I embedded that code in header and receive errors with tt() function (doesnt exist)... could you please help me?
#18
Those are all temp solutions did you try #5 ?
a different setup would be entity/entity_translation/title/i18n modules that might do the trick
#19
#5 didnt work, I use D7, #12 makes an error :/
#20
anybody any idea how to replace tt() function in D7 to get localized term name having its id?