WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Change language of droplet ModifiedWhen and LoginBox
  • Print
Pages: [1]   Go Down

Author Topic: Change language of droplet ModifiedWhen and LoginBox  (Read 20250 times)

Offline RonK

  • Posts: 151
  • Gender: Male
    • Progstreaming Classic
Change language of droplet ModifiedWhen and LoginBox
« on: April 01, 2015, 02:21:26 PM »
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?


Logged
CU,
Ronk
http://www.progstreamingclassic.com

Offline hillschmidt

  • Posts: 388
Re: Change language of droplet ModifiedWhen and LoginBox
« Reply #1 on: April 02, 2015, 09:07:39 AM »
Admin -> Droplets -> edit e.g. ModifiedWhen.
You will see this:
Code: [Select]
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
Code: [Select]
$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.
Logged

Offline RonK

  • Posts: 151
  • Gender: Male
    • Progstreaming Classic
Re: Change language of droplet ModifiedWhen and LoginBox
« Reply #2 on: April 02, 2015, 10:50:07 AM »
Quote from: hillschmidt on April 02, 2015, 09:07:39 AM
Admin -> Droplets -> edit e.g. ModifiedWhen.
You will see this:
Code: [Select]
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
Code: [Select]
$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.
Logged
CU,
Ronk
http://www.progstreamingclassic.com

Offline hillschmidt

  • Posts: 388
Re: Change language of droplet ModifiedWhen and LoginBox
« Reply #3 on: April 02, 2015, 10:59:47 AM »
Quote
Yes, 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 ...

Quote
OK, 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?
Logged

Offline RonK

  • Posts: 151
  • Gender: Male
    • Progstreaming Classic
Re: Change language of droplet ModifiedWhen and LoginBox
« Reply #4 on: April 02, 2015, 01:19:09 PM »
Quote from: hillschmidt on April 02, 2015, 10:59:47 AM
Quote
Yes, 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 ...

Quote
OK, 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.
Logged
CU,
Ronk
http://www.progstreamingclassic.com

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Change language of droplet ModifiedWhen and LoginBox
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2