Forum Moderators: coopster
Maybe the whole approach is wrong, but I do want to keep all the strings together for translation purposes later (and adding languages) Suggestions please.
file: en_strings.inc.php
<?
if(!isset($strings['search_prompt']) {
$strings['search_prompt'] = "Search";
}
?>
file: site_header.inc.php
<?
include($lang."_strings.php");
?>
file: functions.inc.php
<?
function searchbox(&$strings) {
// pass by reference to reduce overhead
}
file: any_old_page.php
<?
echo "<p>" . $strings['search_prompt'] . "</p>";
echo search_box($strings);
?>