WordPress.org

Support

Support » Plugins and Hacks » Make it WPML compatible

Make it WPML compatible

  • Plugin author: I don’t know if is possible to commit this changes I’ve made to make the plugin front text string translatable so I place it over here for your review and if is possible add it in the next versions so me and the rest of this plugin users can receive this addon with the rest of upcoming updates if exists.

    The changes are just inside the aremc_markup() where I envolve the outputted text like “Selling Price”, “Down Payment”… etc inside the function __() which makes this strings translatable via the WPML Multilingual plugin.

    function aremc_markup(){
    	$aremc_price = get_option('aremc_price');
    	$aremc_down = get_option('aremc_down');
    	$aremc_interest = get_option('aremc_interest');
    	$aremc_years = get_option('aremc_years');
    	$aremc_txt_selling_price = __(get_option('aremc_txt_selling_price'));	//Translate via WPML
    	$aremc_txt_down_payment = __(get_option('aremc_txt_down_payment'));	//Translate via WPML
    	$aremc_txt_interest_rate = __(get_option('aremc_txt_interest_rate'));	//Translate via WPML
    	$aremc_txt_years = __(get_option('aremc_txt_years'));	//Translate via WPML
    	$aremc_txt_monthly_payment = __(get_option('aremc_txt_monthly_payment'));	//Translate via WPML
    	$aremc_txt_instructions = __(get_option('aremc_txt_instructions'));	//Translate via WPML
    	$aremc_txt_money_symbol = get_option('aremc_txt_money_symbol');
    	$aremc_markup = '<form id="aremc" action=""><table><tr><td><span class="aremc_label">' . $aremc_txt_selling_price . '</span><span class="aremc_field">' . $aremc_txt_money_symbol . '<input name="text" type="text" id="textA" onfocus="this.className=';
    	$aremc_markup .= "'boxFocus'";
    	$aremc_markup .= '" onkeydown="xdelay(';
    	$aremc_markup .= "'a'";
    	$aremc_markup .= ')" value="' . $aremc_price . '" size="12" autocomplete="off" /></span></td><td><span class="aremc_label">'. $aremc_txt_down_payment . '</span><span class="aremc_field">' . $aremc_txt_money_symbol . '<input name="text4" type="text" id="textD" onkeydown="xdelay(';
    	$aremc_markup .= "'d'";
    	$aremc_markup .= ')" value="' . $aremc_down . '" size="12" autocomplete="off"/></span></td></tr><tr><td><span class="aremc_label">' . $aremc_txt_interest_rate . '</span><span class="aremc_field"><input name="text2" type="text" id="textB" onfocus="this.className=';
    	$aremc_markup .= "'boxFocus'";
    	$aremc_markup .= '" onkeydown="xdelay(';
    	$aremc_markup .= "'b'";
    	$aremc_markup .= ')" value="' . $aremc_interest . '" size="5" autocomplete="off"/>%</span></td><td><span class="aremc_label">' . $aremc_txt_years . '</span><span class="aremc_field"><input name="text3" type="text" id="textC" onfocus="this.className=';
    	$aremc_markup .= "'boxFocus'";
    	$aremc_markup .= '" onkeydown="xdelay(';
    	$aremc_markup .= "'c'";
    	$aremc_markup .= ')" value="' . $aremc_years . '" size="5" autocomplete="off"/></span></td></tr><tr><td><span class="aremc_label">' . $aremc_txt_monthly_payment . '</span><span class="aremc_field">' . $aremc_txt_money_symbol . '<input name="text5" type="text" id="resultbox" onkeydown="xdelay(';
    	$aremc_markup .= "'x'";
    	$aremc_markup .= ')" value="" size="12"/></span></td><td><span class="aremc_text">' . $aremc_txt_instructions . '</span></td><td style="clear:both;"><!-- --></td></tr></table></form>';
    	return $aremc_markup;
    }

    http://wordpress.org/plugins/advanced-real-estate-mortgage-calculator/

  • The topic ‘Make it WPML compatible’ is closed to new replies.