Seeing that reminds me of the phpBB I worked with several years ago (writing mods for ver 2)
There is a
language folder that has a
lang_english folder. That folder has a few PHP "lang_" files. i.e. admin, bbcode, faq, main. Each with lengthy arrays eg.
// Index page
$lang['Index'] = 'Index';
$lang['No_Posts'] = 'No Posts';
$lang['No_forums'] = 'This board has no forums';
$lang['Private_Message'] = 'Private Message';
$lang['Private_Messages'] = 'Private Messages';
$lang['Who_is_Online'] = 'Who is Online';
$lang['Mark_all_forums'] = 'Mark all forums read';
$lang['Forums_marked_read'] = 'All forums have been marked read';
Then in the template files
$message = $lang['Forums_marked_read']
. '<br /><br />'
. sprintf($lang['Click_return_index'], '<a href="'
. '">', '</a> ');
The important thing is that every text string that is to have translations can not be hard-coded. They need to either be a variable or a function call or something the templating engine will use to replace with a string translation.
<span>' . $lang['sometext'] . '</span>
<span>' . __('sometext', 'en_us') . '</span>