Hi all,
I'm using this fantastic module, but I noticed that it lacks in i18n compatibility.
Specifically, if I made a translation of a block title (linked) in other languages, the term itself results translated, but its link disappear in translations.
How I can keep the title link in other languages? And also I think there would be the possibility to translate also the destination "href" for each language.
Thank you very much for your work, and sorry for my bad english
MXT
Comments
Comment #1
ngmaloney commentedI'll look into adding i18n compatibility. Could this be achieved by adding a t() around the url variable?
Comment #2
mxtMay be.
What I have now if I make a string research for my block title in the translation interface management, I'll obtain the title itself to translate, without any < a > html tag.
I think that the result for translating string have to return all the html, like this for example:
In this way I'll be able to translate everything for other available languages, for example:
ITALIAN:
Do you think it could be a way to proceed ?
Thank you
Comment #3
mxtI think this issue has to be marked as MAJOR because, de facto, this module doesn't work in multilingual websites.
Link on blocks title disappear at all in translated version of blocks.
Thank you very much.
Comment #4
ngmaloney commentedThe title attribute and anchor text should be easy, as I think wrapping them in a t() would work. I don't know the best approach for having multi-language URL's. Can the path in an l() be wrapped in t()? If not, how do other contrib modules handle translating URL's?
Comment #5
ngmaloney commented@MXT would you be able to roll a patch with suggestions on how to resolve?
Comment #6
mxtOoops Ngmaloney, i think there's a misunderstanding: I'm not a programmer! So I can't do a patch... My only contribute here to this Community is reporting issues, testing and so on... :-(
Anyway, I think using t(l(....)) may be the right solution, but I can't know if it would be the best approach to resolve this kind of issues, sorry...
Thank you for your work.
Comment #7
ngmaloney commented@MTX - Try this http://c0532142.cdn.cloudfiles.rackspacecloud.com/block_titlelink.tgz I added t() around the title and urls. If it works let me know and I'll patch and release to the 6.x build.
Comment #8
zzadik commentedUntil this get's resolved I've found a pretty easy solution which doesn't involve patching the module.
In my theme's block template file (block.tpl.php), I've translated the block's subject.
Please see the example below (I've used Garland for this example):
Comment #9
ngmaloney commented@zzadik thanks for the code. That is essentially how the #7 patch I posted works. Would you mind testing it?
Comment #10
zzadik commented@ngmaloney, I tried the code, but for some reason I got numerous errors and didn't have the time to analyze their source. Had to choose the easier path for now
Comment #11
quazardous commentedtry to just set the weight of block_title_link module greater than i18n_blocks module...
EDIT : actualy working
Comment #12
alexbk66- commented@quazardous, great! Changing module weight works!
Comment #13
ngmaloney commentedClosing as it seems changing module weight (#11) fixes problem.