2 yabba Jun 09, 2006 11:22

I just installed the script for the blog (which is amazing in its simplicity) but I have encountered a rather strange problem. I have installed a few php scripts before so know the basics of interfile interactions. My locale is set to english UK (in the /locale folder there is no such directory but the commands are in english so no problem there). But when I login some of the commands are written in chinese. I have tried registering a new user and the registration page is fine but when it comes to the login page it comes up in chinese. This is not a problem as I speak chinese but for other this could is. I have also noticed that it happens with one other files and that is the forgot password file. The code for the login page (.../htrs/_login_form.php)
.....$page_title = T_('Login form');
$page_icon = 'icon_login.gif';
require(dirname(__FILE__).'/_header.php');
param( 'redirect_to', 'string', $ReqURI );
param( 'log', 'string', '' ); // last typed login
$location = $redirect_to;
debug_log( 'location: '.$location );
?>
<form action="<?php echo $location ?>" method="post" class="fform">
<?php
if( !empty($mode) )
{ // We're in the process of bookmarkletting something, we don't want to loose it:
param( 'text', 'html', '' );
param( 'popupurl', 'html', '' );
param( 'popuptitle', 'html', '' );
?>
<input type="hidden" name="mode" value="<?php echo format_to_output( $mode, 'formvalue' ) ?>" />
<input type="hidden" name="text" value="<?php echo format_to_output( $text, 'formvalue' ) ?>" />
<input type="hidden" name="popupurl" value="<?php echo format_to_output( $popupurl, 'formvalue' ) ?>" />
<input type="hidden" name="popuptitle" value="<?php echo format_to_output( $popuptitle, 'formvalue' ) ?>" />
<?php
}
?>
<fieldset>
<div class="center"><span class="notes"><?php printf( T_('You will have to accept cookies in order to log in.') ) ?></span></div>
<fieldset>
<div class="label"><label for="log"><?php echo T_('Login:') ?></label></div>
<div class="input"><input type="text" name="log" id="log" size="16" maxlength="20" value="<?php echo format_to_output($log, 'formvalue'); ?>" class="large" /></div>
</fieldset>
<fieldset>
<div class="label"><label for="pwd"><?php echo T_('Password:') ?></label></div>
<div class="input"><input type="password" name="pwd" id="pwd" size="16" maxlength="20" value="" class="large" /></div>
</fieldset>
<fieldset>
<div class="input">
<input type="submit" name="submit" value="<?php echo T_('Login:') ?>" class="search" />
</div>
</fieldset>
</fieldset>
</form>
<div style="text-align:right">
<?php user_register_link( '', ' · ' )?>
<a href="<?php echo $baseurl ?>"><?php echo T_('Go to Blogs') ?></a>
·
<a href="<?php echo $htsrv_url ?>/login.php?action=lostpassword&redirect_to=<?php echo urlencode( $redirect_to ) ?>"><?php echo T_('Lost your password ?') ?></a>
</div>
The funny thing is that
<a href="<?php echo $baseurl ?>"><?php echo T_('Go to Blogs') ?></a>
appears correctly. I know that according to the different langauage settings the code pulls the words from the locales files but in this case I am wanting to stop that.
I have managed to make a few alterations to correct the problem only temporarely. I have substituted parts of code with simple t_strings but if someone were to choose a different language they would have english in these places...
I have played a little more with the blog and I have encountered another problem. This time it is when I try and post a comment with out a email address or without a comment this is what comes up
ÎÞ·¨·¢±íÆÀÂÛ£¬ÇëÐ޸ĴíÎó£º
* ÇëÊäÈëÃû×Ö
* ÇëÊäÈëÓʼþµØÖ·
* Please do not send empty comment[·µ»ØÆÀÂÛ±à¼Çø]
Some of the commands come up in english others do not. I am very confused as to why it is happening.
thanks
English UK
Wierd, do you have a link to your blog ?
¥
certainly it is www.stocktalk.co.uk
As mentioned the login page now only has the one character as I replaced the code. This one is left as I am unsure what and how to change it.
Thanks
What's the default locale set to in admin > settings > regional ?
¥