tengo un pequeño problema, estoy tratando de traducir un plugin utilizando
wpml locotranslate polylang
Trate de moficar los archivos .po .mo, pero nada, no consigo que el plugin cambie de idioma, segun el desarrollador es de facil traduccion
/**
* Creating widget front-end - This is where the action happens.
* @param array $args
* @param array $instance
*/
public function widget( $args, $instance ) {
$title = ( isset( $instance['title'] ) && ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Monthly Mortgage Payments', 'mc' );
$title = apply_filters( 'widget_title', $title );
$mc_total_amount_label = ( isset( $instance['mc_total_amount_label'] ) && ! empty( $instance['mc_total_amount_label'] ) ) ? $instance['mc_total_amount_label'] : __( 'Total Amount', 'mc' );
$mc_down_payment_label = ( isset( $instance['mc_down_payment_label'] ) && ! empty( $instance['mc_down_payment_label'] ) ) ? $instance['mc_down_payment_label'] : __( 'Down Payment', 'mc' );
$mc_interest_rate_label = ( isset( $instance['mc_interest_rate_label'] ) && ! empty( $instance['mc_interest_rate_label'] ) ) ? $instance['mc_interest_rate_label'] : __( 'Interest Rate', 'mc' );
$mc_mortgage_period_label = ( isset( $instance['mc_mortgage_period_label'] ) && ! empty( $instance['mc_mortgage_period_label'] ) ) ? $instance['mc_mortgage_period_label'] : __( 'Mortgage Period', 'mc' );
// before and after widget arguments are defined by themes
echo $args['before_widget'];
if ( ! empty( $title ) ) {
echo $args['before_title'] . $title . $args['after_title'];
}
?>
<div class="mc-wrapper clearfx">
<form id="mc-form" action="#mc-form">
<p>
<label for="mc-total-amount"><?php echo esc_html( $mc_total_amount_label ); ?></label>
<input type="number" name="mc_total_amount_label" id="mc-total-amount" min="1" class="required" placeholder="<?php echo mc_get_option( 'mc_currency_sign', 'mc_settings', '$' ); ?>" value="<?php echo apply_filters( 'mc_total_amount', null ); ?>"/>
</p>
<p>
<label for="mc-down-payment"><?php echo esc_html( $mc_down_payment_label ); ?></label>
<input type="number" name="mc_down_payment_label" id="mc-down-payment" min="1" class="required" placeholder="<?php echo mc_get_option( 'mc_currency_sign', 'mc_settings', '$' ); ?>">
</p>
<p>
<label for="mc-interest-rate"><?php echo esc_html( $mc_interest_rate_label ); ?></label>
<input type="number" name="mc_interest_rate_label" id="mc-interest-rate" min="1" class="required" placeholder="<?php esc_html_e( '%', 'mc' ); ?>">
</p>
<p>
<label for="mc-mortgage-period"><?php echo esc_html( $mc_mortgage_period_label ); ?></label>
<input type="number" name="mc_mortgage_period_label" id="mc-mortgage-period" class="required" placeholder="<?php esc_html_e( 'Years', 'mc' ); ?>">
</p>
<p>
<input type="submit" id="mc-submit" value="<?php esc_html_e( 'Calculate Mortgage', 'mc' ); ?>">
</p>
</form>
<!-- This div is holding output values-->
<div id="mc-output" class="clearfix"></div>
</div>
<?php echo $args['after_widget'];
}
Seria de mucha ayuda que alguien me ayude :)
la respuesta con la solucion se gana un cafe/cerveza
echo ...
conecho __(...)
?