Quantcast
Channel: Question and Answer » json
Viewing all articles
Browse latest Browse all 148

How to syntax Json output for translation?

$
0
0

Example I have this outputting decoded JSON $data and want to make contents translateable in wordpress.

<?php echo $data['hair']['type'] )?>

So in english this would output “Brown hair”, but I’d like them to be available for translation.

I know there is some syntax to put strings in __('string') but I cant seem to make it work with Json outputs.


Viewing all articles
Browse latest Browse all 148

Trending Articles