New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to hook Languages class to edit the returned $languages #54
Comments
PS - here is some background: https://processwire.com/talk/topic/14237-ml-in-certain-branches-of-page-tree/ |
Here is the first version of the module I am working on: https://processwire.com/talk/topic/14891-restrict-multi-language-branch/ It currently supports disabling multi-language support on a page/branch basis, but ideally I would like to extend it so you can also use it to change which languages are available to a page/branch. |
+1 for that. I think that it will be great enhancement in ML site approach. Very often only non-default languages needed for some branches/pages. |
Hey @ryancramerdesign - any thought on this? Looks like it would be useful for others as well: Thanks! |
As far as I understand, I am looking for exactly the same thing as @adrianbj described. I guess that if you can do it on "branch by branch basic" then "page be page" will also be possible. This thing seems to be really useful for larger multi-language sites as the one I am working on right now. Esteemed @ryancramerdesign , could you please take a look at this issue while you are working on them anyway? |
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!
The text was updated successfully, but these errors were encountered: