<?LANG(no_download, 'you are not allowed to download')
instead of
$lang[no_download]
I have what I think is a better approach for embedding language strings in templates.
In almost all the PHP applications, the predominant language placeholder format is like <?=$lang['no_download']?>
or {{no_download}}
. Other designers/developers/translators will have a hard time deciphering what the placeholders represent without referring to the language file.
In order to make language placeholders more descriptive, why don't we include the original string together with the placeholder? e.g.
<?=lang( 'no_download' , 'You are not allowed to download this file because you have exceeded your quota' )?>
The second parameter is a dummy and thus nothing is being done to it by the lang() function.
At a glance, one might think that it is too verbose, adding clutter to the template markup. But in my opinion it is not a valid argument since the language string would've taken as much space as the placeholder if it weren't language aware.
I would like to hear your thoughts regarding this.