1

I'm new to Drupal, so I don't know if what I want to do is even possible. I want to create six checkboxes that represent different languages - let's call them A,B,C,D,E,F so that every user can check as many as he/she wants during registration and change it later (I already did that by adding field in account settings). Moreover, on one page I'd like to have six blocks of text (one for each language) but only show the checked ones (so each user would see different content). Finally, I want to enable users to create their own content which would be published after administrator's review - difficult part is that every administrator should have language/-es that he/she specializes in and be able to accept/edit content only in that language/-es.

If I am not being specific enough please let me know and I will try to elaborate.

Thanks for you help! Dominik

0

You can accomplish the first by enabling PHP in modules, and making a check in the block configuration / Pages - using php you can check each block for the appropriate $user field and whether or not its set for that particular language. You could also create a module to build each block programmatically, and then show/hide depending on the field value.

The second can be done with something like this:

Content Type * create a hidden field called language

  • using Rules set an event (After Saving New Content - ), event - set data value - node->language equal to user->language. This will assign a language to each node created

  • create a view with the relevant fields/information you want presented, and filter on current user:language - in this way each user who sees this view will only see the entries that match their own language settings

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.