__() translation function not working to output array value
-
Hi!
I’m trying to translate strings for an array value like so:
$array = array( 'key' => array( __('Display name', 'plugin-text-domain'), 'other_value' ) );
But as mentioned on this question, I have the following error:
Parse error: syntax error, unexpected '(', expecting ')'
on the array element. If the __() function is replaced with a plain string, it works.Any ideas ?
- The topic ‘__() translation function not working to output array value’ is closed to new replies.