Jump to content

Recommended Posts

Posted

Hello, I’d like to give a non-superuser the possibility to add new languages and thought this is done via the lang-edit permission. However, assigning this permission to the role didn’t do the trick. There’s still no option to create a new language under Setup > Languages.

Do you have any idea on how to provide the permission to add new languages?

Posted

This is because non-superusers aren’t allowed to add children under /processwire/setup/languages. First, because /processwire/setup/languages is of template admin, you would need to open the template settings for admin and check the box “add children” in the access tab. Then you also need to give them permission to create pages of template language, so in the language template, enable access control and check “edit pages” and “create pages”.

This isn’t a very nice solution, because you have to change access for all admin pages. I suppose it would be neat if a “lang-add” permission came with the language support module. Alternatively, you can probably write a hook to add a button somewhere that creates a language and bypasses those permission checks.

  • Like 2
Posted

@Jan Romero Thanks a lot for helping out. That's how it works!

I already adjusted the access rights for the languages template, but didn't know that it acts as child of the admin template…

I also think a dedicated permission would be nice here.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...