What if i only wanted to add the french translation, is the following code right? Coz i tried it and it doesn’t work. Please help! Anything else i need to be updating?
public function translateTerms(){
// Write French term for each unit below.
$french = array(
‘years’ => ‘Ans’,
‘months’ => ‘Mois’,
‘weeks’ => ‘Semaines’,
‘days’ => ‘Jours’,
‘hours’ => ‘Heures’,
‘minutes’ => ‘Minutes’,
‘seconds’ => ‘Secondes’
);
if( get_locale() === ‘fr_FR’ ) self::$terms[‘units’] = $french;
else {
$units = get_option(‘pbc_unit_terms’);
self::$terms[‘units’] = $units ? $units : array(
‘years’ => __(‘Years’, ‘waiting’),
‘months’ => __(‘Months’, ‘waiting’),
‘weeks’ => __(‘Weeks’, ‘waiting’),
‘days’ => __(‘Days’, ‘waiting’),
‘hours’ => __(‘Hours’, ‘waiting’),
‘minutes’ => __(‘Minutes’, ‘waiting’),
‘seconds’ => __(‘Seconds’, ‘waiting’)
);
}
self::$terms[‘fui’] = array();
-
This reply was modified 6 years, 9 months ago by akay86.