HOWTO have the user login block in a consistant language at customizing the block title ?

Last modified: July 30, 2009 - 06:08

This is the approach I have followed, there might have others :

This works with 2 languages and the principle is the same with more languages. The idea is to create one new block per language and to invoque some php code to insert the user login block content.

  1. Assign the language to be English for the user login block provided by the user module. Customize the title to be "Member registration". Then save. At this stage, the user login block will appear only when the user is chosing the English language. And of course we want the user login block appear for each language.
  2. Create a new block with comment "Chinese User Login" and set the title to be "会员注册".
  3. Assign the language to be Chinese for this new block.
  4. For the block content use PHP insert mode and input :

<?php
$block
= module_invoke('user', 'block', 'view', 'login');
print
$block['content'];
?>

 
 

Drupal is a registered trademark of Dries Buytaert.