Change the tab title 'Media'

How can I change the title of the BP tab for Media? I want it to say Portfolio.

I’ve tried the following code in bp-custom.php but it breaks the site:

$bp->bp_nav[‘media’][name’] = ‘Portfolio’;



Please check this document page, you can just define a correct value in wp-config.php file to change the title and URL slug.