1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Theme content installation confirmation page added.

This commit is contained in:
Cameron
2013-03-08 04:46:02 -08:00
parent 1396cfbb69
commit 93ca31d6ad
3 changed files with 99 additions and 10 deletions

View File

@@ -324,6 +324,26 @@ class language{
return FALSE;
}
/**
* Generic variable translator for LAN definitions.
* @example $lng->translate("My name is [x] and I own a [y]", array('x'=>"John", 'y'=>"Cat"));
*/
function translate($lan, $array= array())
{
foreach($array as $k=>$v)
{
$search[] = "[".$k."]";
$replace[] = "<b>".$v."</b>";
}
return str_replace($search, $replace, $lan);
}
/**