Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  change labels

phpMyEdit Configuration     change labels
Odoslať novú tému   Odpovedať na tému    
 
ken     Založený: 05.12.2003   Príspevky: 5  
Príspevok Zaslal: 2003-12-05 01:55
Návrat hore  Odpovedať s citátom     

I would like to change labels. I tried declaring:

$labels = array(
'Prev','Add','Change','Delete','Next',
'Page','Records', 'Save','More1','Cancel',
'record added','record changed','record deleted',
'Please enter'
);

as suggested @ http://phpmyedit.org/configuring.php In the caller but to no avail.

Has anyone done this?

Thanks Ken

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2003-12-05 19:06
Návrat hore  Odpovedať s citátom     

i have not tried this but as a workaround you can create your own language and use appropriate option to call this language. they are in ./lang directory

 
ken     Založený: 05.12.2003   Príspevky: 5  
Príspevok Zaslal: 2003-12-05 19:43
Návrat hore  Odpovedať s citátom     

michal Napísal:
i have not tried this but as a workaround you can create your own language and use appropriate option to call this language. they are in ./lang directory


Thanks I did try that and it works. However I extended the class because I did not want certain buttons on the add to even show up:

Kód:
require 'phpMyEdit.class.php';

class DCH extends phpMyEdit
{

   /*
    * Display buttons at top and bottom of page
    */
   function display_record_buttons() /* {{{ */
   {
      echo '<table class="',$this->getCSSclass('navigation', $position),'">',"\n";
      echo '<tr class="',$this->getCSSclass('navigation', $position),'">',"\n";
      echo '<td class="',$this->getCSSclass('buttons', $position),'">',"\n";
      if ($this->change_operation()) {
         echo '<input class="',$this->getCSSclass('save', $position);
         echo '" type="submit" name="savechange" value="',$this->labels['Save'],'">&nbsp;';
         echo '<input class="',$this->getCSSclass('more', $position);
         echo '" type="submit" name="morechange" value="',$this->labels['Apply'],'">&nbsp;';
         echo '<input class="',$this->getCSSclass('cancel', $position);
         echo '" type="button" name="cancel" value="',$this->labels['Cancel'];
         echo '" onClick="form.submit();">',"\n";
      } elseif ($this->add_operation()) {
         echo '<input class="',$this->getCSSclass('save', $position);
         echo '" type="submit" name="saveadd" value="',$this->labels['Save'],'">&nbsp;';
         //echo '<input class="',$this->getCSSclass('more', $position);
         //echo '" type="submit" name="moreadd" value="',$this->labels['More'],'">&nbsp;';
         echo '<input class="',$this->getCSSclass('cancel', $position);
         echo '" type="button" name="cancel" value="',$this->labels['Cancel'];
         echo '" onClick="form.submit();">',"\n";
      } elseif ($this->copy_operation()) {
         echo '<input class="',$this->getCSSclass('save', $position);
         echo '" type="submit" name="saveadd" value="',$this->labels['Save'],'">&nbsp;';
         echo '<input class="',$this->getCSSclass('cancel', $position);
         echo '" type="button" name="cancel" value="',$this->labels['Cancel'];
         echo '" onClick="form.submit();">',"\n";
      } elseif ($this->delete_operation()) {
         echo '<input class="',$this->getCSSclass('save', $position);
         echo '" type="submit" name="savedelete" value="',$this->labels['Delete'],'">&nbsp;';
         echo '<input class="',$this->getCSSclass('cancel', $position);
         echo '" type="button" name="cancel" value="',$this->labels['Cancel'];
         echo '" onClick="form.submit();">',"\n";
      } elseif ($this->view_operation()) {
         if ($this->change_enabled()) {
            echo '<input class="',$this->getCSSclass('save', $position);
            echo '" type="submit" name="operation" value="',$this->labels['Change'],'">&nbsp;';
         }
         echo '<input class="',$this->getCSSclass('cancel', $position);
         echo '" type="submit" name="cancel" value="',$this->labels['Cancel'],'">',"\n";
      }
      // Message is now written here
      echo '</td>',"\n";
      if (strlen(@$this->message) > 0) {
         echo '<td class="',$this->getCSSclass('message', $position),'">',$this->message,'</td>',"\n";
      }
      echo '</tr></table>'."\n";
   } /* }}} */



}
?>


 
nepto     Založený: 06.01.2003   Príspevky: 320   Bydlisko: Phoenix, Arizona (USA)
Príspevok Zaslal: 2003-12-16 12:03
Návrat hore  Odpovedať s citátom     

You choose phpMyEdit Extensions way. That's good approach, but if you want only redefine language keys, that it is definitelly better way to create your own language file. Please look into lang/ subdirectory of the phpMyEdit distribution.

_________________
Ondrej Jombik (Nepto)
Visit my homepage , review my recent CV or projects and give me some feedback .
 
ken     Založený: 05.12.2003   Príspevky: 5  
Príspevok Zaslal: 2003-12-16 14:17
Návrat hore  Odpovedať s citátom     

nepto Napísal:
You choose phpMyEdit Extensions way. That's good approach, but if you want only redefine language keys, that it is definitelly better way to create your own language file. Please look into lang/ subdirectory of the phpMyEdit distribution.


Just wanted to conclude the thread. The application is live and my clients are "elated". Thanks for a great piece of code!

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov