Change Block Title

Change Block Title

by Tareque Chowdhury -
Number of replies: 5

Hi

I would like to change my course block title. I do not know how. Please help me to do this.

Thanks

Tareque

Average of ratings: -
In reply to Tareque Chowdhury

Re: Change Block Title

by Julian Ridden -

this really can be dependant on the block. But should they be following the Moodle standard then this is pretty easy.

Go to your lang folder, then EN (or whatever language it is you are using).

Now open in a text or HTML editor the file relevant to your block. Block lang files should follow the naming convention of block_blockname.php

The first string in the file usually reads:

$string['blockname'] = 'Block Name is here';

Just change this to the name you would like to appear.

I have to stress though that sadly not every block out there follows the standards (I know some of my early blkocks were awful) but this should help you out in most cases.

In reply to Julian Ridden

How should languagestring for block title be called?

by Jan Dierckx -
Julian,
Using $string['blockname'] = .... as a convention for naming blocks, causes problems for people who don't have the latest language pack. (look at this discussion and this
That's why I think having something like...
$string['wikipediasearch'] = 'Wikipedia Search';
is better. I do agree that block lang files should follow the naming convention of block_blockname.php.
What is the 'official' standard?

In reply to Julian Ridden

Re: Change Block Title

by Cassidy Roman -
Thank you so much for this! I just spent the last 4 hours trying to figure out how to get a PayPal Donate button to show up in one of the blocks. I even tried adding the Paypal Donations Module found in the modules section of this site, but did not like having the donators listed and a few other things about it as well. This change, let me change the title of the "Course/Site Description" Block to a "Donate" block that I could just add the button to. This was a life saver!!! You all just made my evening smile
In reply to Julian Ridden

Re: Change Block Title

by Claire Browne -
I would like a multi lang block which will display english when the profile language is in english and chinese when the profile lanaguage is chinese.

Can I do this by replicating the block block_mycourse.php and changing the first line $string['blockname'] = 'Block Name is here';
In reply to Julian Ridden

Re: Change Block Title

by Claire Browne -
I would like a multi lang block which will display english when the profile language is in english and chinese when the profile lanaguage is chinese.

Can I do this by replicating the block block_mycourse.php and changing the first line $string['blockname'] = 'Block Name is here';