0

We are using Entity Translation so that content can be created in several language. One item we noticed is that on the basic page, for example, has a language field that you can set when you create a piece of content. As of right now, any users regardless of if their profile's preferred language is set to French (for example), the French user is still able to create a content in English.

Ideal scenario:

If a French user logs in and creates content of type basic page, then the language field should be set to French. If a German user logs in and performs the same actions, the language should be restricted to just creating content using the German language.

Any thoughts on how I would set this up?

1

actually, i would create a custom module (i hope, you know how to code a bit)

the code should be something like the following:

    <?php
    function YOUR_CUSTOM_MODULE_node_presave($node){
        global $user; // gets the current user account
        $node->language=$user->language;
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.