Plugin Author
Chouby
(@chouby)
This in a custom plugin should do the job:
add_filter('option_sharing-options', 'translate_sharing');
if (is_admin() && isset($_GET['page']) && $_GET['page'] == 'mlang')
get_option('sharing-options'); // call the sharing option on polylang admin page
function translate_sharing($options) {
if (is_admin())
pll_register_string('sharing_label', $options['global']['sharing_label']);
else
$options['global']['sharing_label'] = pll__($options['global']['sharing_label']);
return $options;
}
Hey Chouby,
I greatly appreciate your help (once again) but nothing happens…
Is it OK to put in functions.php or must it be in a custom plugin at all costs?
Matteo
I’m on a multisite installation: would that matter?
Plugin Author
Chouby
(@chouby)
It works in functions.php too, although I prefer using a custom plugin, to avoid loosing customizations when updating the theme.
You must not keep the default sharing label in the Jetpack plugin options because Jetpack makes a test against this default value and does not save it in the database. Also you must not leave it empty (as Polylang does not look for empty strings). Any other value should work.
I did not test in multisite installation.
You are a champion!
If there were a prize for “Best Plugin Support” you’d win it hands down!