I assume you have some knowledge of PHP.
Edit the Waiting.php file of Waiting plugin, look for translateTerms
function, then replace with the below function.
Write if/else
statements for the lanaguages you need the terms for. See what the constant ICL_LANGUAGE_CODE
holds ( uppercase / lowercase etc ), I don’t have WPML installed, I got this constant from some post in their site.
I have plans for this to include in the plugin, but some users have also asked for Translate forms for each plugin, I’ll have to think about the UI.
function translateTerms(){
self::$terms['fui'] = array();
$unit_terms = array();
if( ICL_LANGUAGE_CODE === 'es' ){
// Replace Years, Months etc with their Spanish terms
$unit_terms = array(
'years' => __('Years', 'waiting'),
'months' => __('Months', 'waiting'),
'weeks' => __('Weeks', 'waiting'),
'days' => __('Days', 'waiting'),
'hours' => __('Hours', 'waiting'),
'minutes' => __('Minutes', 'waiting'),
'seconds' => __('Seconds', 'waiting')
);
} else if (ICL_LANGUAGE_CODE === 'de'){
// Replace Years, Months etc with their German terms
$unit_terms = array(
'years' => __('Years', 'waiting'),
'months' => __('Months', 'waiting'),
'weeks' => __('Weeks', 'waiting'),
'days' => __('Days', 'waiting'),
'hours' => __('Hours', 'waiting'),
'minutes' => __('Minutes', 'waiting'),
'seconds' => __('Seconds', 'waiting')
);
} else {
// Return English terms by default. You can make any other language the default one.
$unit_terms = array(
'years' => __('Years', 'waiting'),
'months' => __('Months', 'waiting'),
'weeks' => __('Weeks', 'waiting'),
'days' => __('Days', 'waiting'),
'hours' => __('Hours', 'waiting'),
'minutes' => __('Minutes', 'waiting'),
'seconds' => __('Seconds', 'waiting')
);
}
self::$terms['units'] = $unit_terms;
}