View more context


Ugh, apparently has to be done in a translation file

i guess that makes sense. you should be able to do that at the project level i would've thought, e.g. app/lang/en.yml

wait, it looks like you should be able to use a config prop too the way you've done it above

ok yeah you're right, you need to change it both places

  1. # app/_config/mysite.yml
  2. SilverStripe\AssetAdmin\Controller\AssetAdmin:
  3. menu_title: 'Document Store'
  4.  
  5. # app/lang/en.yml
  6. en:
  7. SilverStripe\AssetAdmin\Controller\AssetAdmin:
  8. MENUTITLE: 'Document Store'

because LeftAndMain::menu_title() default for $localise is true, and :

  1. // Check localisation
  2. if (!$localise) {
  3. return $title;
  4. }
  5. return i18n::_t("{$class}.MENUTITLE", $title);

Yea, _t only falls back to the config variable if the translation doesn't exist

but in asset admin, the translated value is set