I couldnt find the way yet,
I have try:
- the drupal translation system.
- In the upright-40.tpl.php I am using I have to add print 'להמשך קריאה' (its hebrew) but its gives a utf-8 error...

What can I do in order to change it?

CommentFileSizeAuthor
#10 erro.PNG223.9 KBchansion.vc

Comments

ppblaauw’s picture

Category: task » support
Status: Active » Postponed (maintainer needs more info)
Issue tags: +translation, +Advanced slideshow

See 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:

  $vars['slide_read_more'] = t('Read more...');

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

$slide_read_more

which will translate to the hebrew translation.

Hope this helps you further, please let me know.

amirtaiar’s picture

Thank 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.

raffi’s picture

to 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

$readstr = $slider_item['slide_read_more'];
$slider_item['slide_read_more'] = str_replace('Read more...', '<your new string>', $readstr);
ppblaauw’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

close issue, 8 weeks without activity.

mefisto75’s picture

Status: Closed (fixed) » Active

ppblaauw
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...

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)

You need to add the line:

$vars['slide_read_more'] = t('Read more...');

to the ddblock.module file at line: 1616, just before the line:

  $vars['css'] = $vars['settings']['css'];

In the preprocess function in your template.php file you can now change:

          // add slide_read_more variable and slide_node variable
          if (isset($result->nid)) {
            $slider_items[$key1]['slide_read_more'] =  l('Read more...', 'node/' . $result->nid);
            $slider_items[$key1]['slide_node'] =  base_path() . 'node/' . $result->nid;
          }

into

          // add slide_read_more variable and slide_node variable
          if (isset($result->nid)) {
            $slider_items[$key1]['slide_read_more'] =  l($vars['slide_read_more'], 'node/' . $result->nid);
            $slider_items[$key1]['slide_node'] =  base_path() . 'node/' . $result->nid;
          }

Hope this helps you further, please let me know.

mefisto75’s picture

Thank you. Excellent support!

ppblaauw’s picture

Title: how can I change the "Read more..." text? » how can I change the "Read more..." text for multi language sites? (Fixed)
Status: Postponed (maintainer needs more info) » Fixed

#7 Assume the answer in #6 solved your issue.
Set status to fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

chansion.vc’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new223.9 KB

When 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

chansion.vc’s picture

Status: Needs review » Closed (fixed)

Sorry, I was wrong.

Advocat’s picture

I 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?

ppblaauw’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

#12
What code did you use before?
What code are you using now?

Advocat’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'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?

ppblaauw’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

#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:

$vars['slide_read_more'] = t('Read more...');

to the ddblock.module file at line: 1616, just before the line:

$vars['css'] = $vars['settings']['css'];

---
In the preprocess function in your template.php file you can use:

          // 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($vars['slide_read_more'], $result->node_data_field_pager_item_text_field_url_value);
          }
          elseif (isset($result->nid)) {
            $slider_items[$key1]['slide_read_more'] = l($vars['slide_read_more'], 'node/' . $result->nid);
          }

hope this helps you further, please let me know.

Advocat’s picture

FYI, 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.

ppblaauw’s picture

Status: Postponed (maintainer needs more info) » Fixed

set status to fixed

Status: Fixed » Closed (fixed)
Issue tags: -translation, -Advanced slideshow

Automatically closed -- issue fixed for 2 weeks with no activity.