Closed (fixed)
Project:
Dynamic display block
Version:
6.x-1.0-rc6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 May 2009 at 12:21 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ppblaauw commentedSee also issue: How to change "read more..." text for Italian only site
In the next version of the module will make "read more", "previous", "next" translatable.
For now you can add:
To the: "function template_preprocess_ddblock_cycle_block_content(&$vars) {"
preprocess function of the module.
With this you can translate it in your normal translation functionality.
In your upright-40.tpl.php you can now use the variable
which will translate to the hebrew translation.
Hope this helps you further, please let me know.
Comment #2
amirtaiar commentedThank you,
Its helped but I have finally set it to non words and design the read more box with the words in it and in the hover...
lookes good!
when I will finish my site I will upload it here.
Comment #3
raffi commentedto change "Read more..." string follow this simple step
After the line 63 from the file ddblock-cycle-block-content-upright30.tpl.php put this code
Comment #4
ppblaauw commentedclose issue, 8 weeks without activity.
Comment #5
mefisto75 commentedppblaauw
Could you please explain where exactly to add this string $vars['slide_read_more'] = t('Read more...');
This one string solves the issue of translating?
Where do I use $slide_read_more if I am using modest-grey50p theme?
raffi
I tried your solution but coding comes out corrupted. Question marks all along instead of Read more...
Comment #6
ppblaauw commentedYou need to add the line:
to the ddblock.module file at line: 1616, just before the line:
In the preprocess function in your template.php file you can now change:
into
Hope this helps you further, please let me know.
Comment #7
mefisto75 commentedThank you. Excellent support!
Comment #8
ppblaauw commented#7 Assume the answer in #6 solved your issue.
Set status to fixed.
Comment #10
chansion.vc commentedWhen I used this way #6
It's change to like this. Attach PNG
Ican't see the text on button.
I was change the
$vars['slide_read_more'] = t('Read more...');
To
$vars['slide_read_more'] = t('详细...');
Other helps ? Thanks
Comment #11
chansion.vc commentedSorry, I was wrong.
Comment #12
Advocat commentedI used your instructions as mentioned above for internationalization of the "Read More" button, which worked perfectly, as regards translation.
However, I found that URL links I had installed (having the Read More button send viewers to different pages) stopped working. The only link the buttons would show are the base created page entries, not the links I had entered via the URL field.
Can this be fixed?
Comment #13
ppblaauw commented#12
What code did you use before?
What code are you using now?
Comment #14
Advocat commentedI've tried adding the URL as:
node/22
/node/22
and the full length absolute URL
As for the actual, code changes, I followed the instructions in#6.
This includes adding: $vars['css'] = $vars['settings']['css']; to the ddblock.module file as described in #6.
I also swapped out the preprocess code in template.php, as described in #6. The preprocess code which was in place to create working links to other pages was installed as per instructions at http://ddblock.myalbums.biz/node/851
// add slide_read_more variable and slide_node variable
if (isset($result->node_data_field_pager_item_text_field_url_value)) {
$slider_items[$key1]['slide_read_more'] = l('Read more...', $result->node_data_field_pager_item_text_field_url_value);
}
elseif (isset($result->nid)) {
$slider_items[$key1]['slide_read_more'] = l('Read more...', 'node/' . $result->nid);
}
I can see now my error in believing the code in #6 would replace your working links code above. Is there replacement code which would allow both translation and linking to pages of choice via Read more?
Comment #15
ppblaauw commented#14
This includes adding: $vars['css'] = $vars['settings']['css']; to the ddblock.module file as described in #6.
You don't add this line
----
You need to add this line:
to the ddblock.module file at line: 1616, just before the line:
---
In the preprocess function in your template.php file you can use:
hope this helps you further, please let me know.
Comment #16
Advocat commentedFYI, I had the line: $vars['slide_read_more'] = t('Read more...'); before: $vars['css'] = $vars['settings']['css'];
I mistakenly copied and pasted the wrong line when posting #14. Apologies for the confusion on this point.
The new code works perfectly: both translation via i18N string replacement and linking of "Read more..." to entered addresses.
Many thanks for the highly professional and timely responses.
Comment #17
ppblaauw commentedset status to fixed