Change language of droplet ModifiedWhen and LoginBox

RonK

Quote from: hillschmidt on April 02, 2015, 10:59:47 AM
QuoteYes, I alos thought it was obvious. So I changed it and it never came thru.
You're sure you used the right droplet? There is also a SiteModified ...

QuoteOK, thanks. I will check that file.
In your case it must be the NL.php ... I'd surprised if this is not translated right. Or do you have another language configured for this page?

I found I had to change the text to Dutch in the droplet section of the backend. I changed the MofiedWhen.php file in /modules/droplets/example directory. That is not used.
The NL.php file was indeed not completely translated.

Thanks for your support.
CU,
Ronk
[url="http://www.progstreamingclassic.com"]http://www.progstreamingclassic.com[/url]

hillschmidt

QuoteYes, I alos thought it was obvious. So I changed it and it never came thru.
You're sure you used the right droplet? There is also a SiteModified ...

QuoteOK, thanks. I will check that file.
In your case it must be the NL.php ... I'd surprised if this is not translated right. Or do you have another language configured for this page?

RonK

Quote from: hillschmidt on April 02, 2015, 09:07:39 AM
Admin -> Droplets -> edit e.g. ModifiedWhen.
You will see this:
global $database, $wb;
if (PAGE_ID>0) {
$query=$database->query("SELECT modified_when FROM ".TABLE_PREFIX."pages where page_id=".PAGE_ID);
$mod_details=$query->fetchRow();
return "This page was last modified on ".date("d/m/Y",$mod_details[0]). " at ".date("H:i",$mod_details[0]).".";
}

Guess what you need to change  ... last line.

Yes, I alos thought it was obvious. So I changed it and it never came thru.

Quote from: hillschmidt on April 02, 2015, 09:07:39 AM
LoginBox is a bit different: here the entries in the selected language are used to make the form (see also the Droplet source as described above, e.g. in the lines
$return_value .= '<h2>'.$TEXT['LOGIN'].'</h2>';
$return_value .= $TEXT['USERNAME'].':<input type="text" name="username" style="text-transform: lowercase;" /><br />';
$return_value .= $TEXT['PASSWORD'].':<input type="password" name="password" /><br />';
$return_value .= '<input type="submit" name="submit" value="'.$TEXT['LOGIN'].'" class="dbutton" /><br />';
$return_value .= '<a href="'.FORGOT_URL.'">'.$TEXT['FORGOT_DETAILS'].'</a><br />';

the code $TEXT[..] gets the content from the languages/*.php file.

OK, thanks. I will check that file.
CU,
Ronk
[url="http://www.progstreamingclassic.com"]http://www.progstreamingclassic.com[/url]

hillschmidt

Admin -> Droplets -> edit e.g. ModifiedWhen.
You will see this:
global $database, $wb;
if (PAGE_ID>0) {
$query=$database->query("SELECT modified_when FROM ".TABLE_PREFIX."pages where page_id=".PAGE_ID);
$mod_details=$query->fetchRow();
return "This page was last modified on ".date("d/m/Y",$mod_details[0]). " at ".date("H:i",$mod_details[0]).".";
}

Guess what you need to change  ... last line.

LoginBox is a bit different: here the entries in the selected language are used to make the form (see also the Droplet source as described above, e.g. in the lines
$return_value .= '<h2>'.$TEXT['LOGIN'].'</h2>';
$return_value .= $TEXT['USERNAME'].':<input type="text" name="username" style="text-transform: lowercase;" /><br />';
$return_value .= $TEXT['PASSWORD'].':<input type="password" name="password" /><br />';
$return_value .= '<input type="submit" name="submit" value="'.$TEXT['LOGIN'].'" class="dbutton" /><br />';
$return_value .= '<a href="'.FORGOT_URL.'">'.$TEXT['FORGOT_DETAILS'].'</a><br />';

the code $TEXT[..] gets the content from the languages/*.php file.

RonK

I would like to change the language of mentioned droplets into Dutch.

I changed the text ("This page was last modified on 01/04/2015 at 08:24.") to a Dutch line in the ModifiedWhen php file, but it does not show on the page.

LoginBox does show Dutch text, but when you login wrong, you partly get English text. I cannot find where I can change this.

Does anyone know the answer?


CU,
Ronk
[url="http://www.progstreamingclassic.com"]http://www.progstreamingclassic.com[/url]