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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -