FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

What is the echo __(underscore) construct?

Feed 2 posts, 2 voices

Avatar
486 posts

I noticed in the file manager plugin that stuff was being outputted like this:

echo __('Create new directory');

What does this do exactly? Is this a PHP thing or a Frog thing?

 
Avatar
1493 posts

What does this do exactly? Is this a PHP thing or a Frog thing?

One way to say it is that it is a PHP thing that Frog does. This is (IIRC) the format for strings which the backend can pick up for translating the interface. Any string so entered will be detected and put in the translation template. For more info, see here and here.

(And if I’ve got that wrong, somebody will tell us!)

 
Avatar
486 posts

Good explanation. Thanks, David!