translation.handler.user.inc 808 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @file
  4. * User translation handler for the entity translation module.
  5. */
  6. /**
  7. * User translation handler.
  8. */
  9. class EntityTranslationUserHandler extends EntityTranslationDefaultHandler {
  10. public function __construct($entity_type, $entity_info, $entity) {
  11. parent::__construct('user', $entity_info, $entity);
  12. }
  13. /**
  14. * @see EntityTranslationDefaultHandler::entityForm()
  15. */
  16. public function entityForm(&$form, &$form_state) {
  17. parent::entityForm($form, $form_state);
  18. $form['picture']['#multilingual'] = FALSE;
  19. $form['locale']['#multilingual'] = FALSE;
  20. $form['locale']['#title'] = t('Preferred language settings');
  21. }
  22. /**
  23. * @see EntityTranslationDefaultHandler::getLanguageKey()
  24. */
  25. public function getLanguageKey() {
  26. return 'entity_language';
  27. }
  28. }