Initial Commit of AgileBill Open Source

This commit is contained in:
unknown
2008-11-26 14:50:40 -08:00
parent ae5a0fc25e
commit 02306ccc47
2954 changed files with 410976 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* File: block.translate.php
* Type: block
* Name: translate
* Purpose: translate a block of text
* -------------------------------------------------------------
*/
function smarty_block_translate($params, $resource, &$smarty)
{
global $C_translate;
if($params["module"] != '')
{
$module = $params["module"];
}
else
{
$module = 'CORE';
}
while(list ($key, $val) = each ($params))
{
$C_translate->value["$module"]["$key"] = $val;
}
$resource = trim($resource);
if ($resource != '') {
# strip whitespaces from the resouce identifier
echo $C_translate->translate($resource,$module,'');
}
}
?>