How it works:
- Each string an entry in the translation array
- Fall back realized with array merging
Definition files:
trans/en.php:
<?php
$l = array();
$l["CLICK_HERE"] = 'Click <a href="%1">here</a> to';
$l["LOGIN"] = 'log in';
$l["LOGOUT"] = 'log out';
?>
trans/nl.php:
<?php
include 'trans/en.php';
$l["LOGIN"] = 'in te loggen';
$l["LOGOUT"] = 'uit te loggen';
?>
Usage:
<?php
include 'trans/nl.php';
printf("{$l['CLICK_HERE']} {$l['LOGIN']}", 'login.php');
?>