SilverStripe ModelAdmin menu title translation -
i'm trying translate custom modeladmin menu title such:
private static $menu_title = _t('cms.mymodeladmin', 'my model admin');
this results in 500 error, whereas static string works without issues. i'm not sure why since assumed variable isn't database entry.
how can translate menu title, preferably using _t?
i've not translated v3, looking at...
http://api.silverstripe.org/3.1/source-class-leftandmain.html#665
$title = _t("{$menuitem->controller}.menutitle", $defaulttitle);
this indicate me if have string defined along other lang strings in yml format (but required languages)...
mysite\lang\en_gb.yml
en_gb: myadmin: menutitle: 'mytitle'
(where "myadmin" name of "class myadmin extends modeladmin...")
Comments
Post a Comment