Skip to content

Ability to hook Languages class to edit the returned $languages #54

@adrianbj

Description

@adrianbj

Short description of the enhancement

I want to be able to add some logic in a module to remove some languages from $languages

Why would the enhancement be useful to users?

The module I want to build will allow devs to hide certain languages from the page editor on a branch by branch basis. I have a site that only needs additional languages for certain branches of the page tree. Having the additional languages appear for the page name, text and textarea fields in the other branches is just a distraction/confusion for the site editors.

At the moment I can't see a way to hook into the languages that are returned. I looked at making Languages::getAll hookable but because $languages is cached, this doesn't really help.

I would appreciate any thoughts you have on how best to achieve this.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions