Ticket #125: index.html.diff
| File index.html.diff, 1.8 kB (added by dmondark, 12 months ago) |
|---|
-
.
733 733 <pre>public function filter_plugin_config( $actions, $plugin_id ) 734 734 { 735 735 if ( $plugin_id == $this->plugin_id() ) { 736 $actions[] = _ ('Configure');736 $actions[] = _t('Configure'); 737 737 } 738 738 return $actions; 739 739 }</pre> 740 The _ () function translates the string into the language used by the site. For English-language blogs, the output would be "Configure", while for Spanish-language blogs, for example, the output might be "Configurar".740 The _t() function translates the string into the language used by the site. For English-language blogs, the output would be "Configure", while for Spanish-language blogs, for example, the output might be "Configurar". 741 741 <pre>public function action_plugin_ui( $plugin_id, $action ) 742 742 { 743 743 if ( $plugin_id == $this->plugin_id() ) { … … 742 742 { 743 743 if ( $plugin_id == $this->plugin_id() ) { 744 744 switch ( $action ) { 745 case _ ('Configure') :745 case _t('Configure') : 746 746 $ui = new FormUI( strtolower( get_class( $this ) ) ); 747 $customvalue= $ui->add( 'text', 'customvalue', _ ('Your custom value:') );747 $customvalue= $ui->add( 'text', 'customvalue', _t('Your custom value:') ); 748 748 $ui->on_success( array( $this, 'updated_config' ) ); 749 749 $ui->out(); 750 750 break;
