New module sidebar entry language string

  • Hi, i created a new module and after the script finished, the name of the new module in the admimn sidebar looks like this:


    I wonder if this is the default behaviour, because i've seen the tutorial videos on how to create a new module and is not happening there. Where do i add the correct module sidebar lang label?

    Thanks in advance

  • Global Moderator


    Hey, yeah pretty much, currently workshop module has 'abc' as class hardcoded, i'll see when i can send PR to fix that.

    You can change identifying string in {Module}/Sidebar/SidebarExtender.php replace abcs with something that makes sense for you, for example tasks::tasks.title.sidebar

    Then add that to translation array in {Module}/Resources/lang/en/tasks.php something like 'title' => ['sidebar' => 'My translation']

  • @armababy Thanks, now i understand how that works. I was in the path of creating an abcs.php lang file with the label, but this is the way to go.

  • Global Moderator


    I personally create new translation file module.php and put there all stuff not related to any of direct entity.
    Things like that(sidebar category, section etc.) would go there (tasks::module.sidebar.title)

    But you can do as you like :) You got all the freedom of laravel and asgard tries not to require specific files and names.

Log in to reply