no translations shown in simple translations code

Permalink
hi,
strange problem, i have a page with a block that comes from an package. this is the file packages/packagename/blocks/blockname/view.php (with some names changed for this open forum):
<?php
Loader::model("name", "name");
$txt = Loader::helper("text");
$this->items = new Packagename('nl');
$this->items->setOverview("2013-03-08","");
$items = $this->items->getOverview();
///talen
$lh = Loader::helper('section', 'multilingual'); 
Localization::changeLocale($lh->getLocale());
// url huidige collection
echo "<a href=\"/~username/".t('agenda')."/?".t('jaar')."=2012&".t('maand')."=1\">test</a><br />";
echo "".t('agenda')." ".t('jaar').":".$jaar." ".t('tmaand').":".$month;
echo "<pre>";
print_r($items);
echo "</pre>";

i have translated the words agenda jaar and maand with the translation manager plugin, and setted the german jahr and monat. when adding this block to an german page it still shows me the folowing html:

<a href="/~username/agenda/?jaar=2012&maand=1">test</a><br />agenda jaar: maand:<pre>Array
(
    [0] => Array
        (
            [item] => Array
                (
                    ...........................deleted at forum..................
                )
        )
)
</pre>

allready rebuild the translation file and updated cache etc. also checked curent setting for language, was german as it should be. is there anything what you have seen more? colleague allready looked at it and it should all be right as how he would use it normally, also added some localization.php to the libraries folder what helped him out at an other projct, also did not affect it.

Thanks in advance,

Bart

 
BartImpression replied on at Permalink Reply
for who gets on this problem by google, this one solved my problem.
<?php   
defined('C5_EXECUTE') or die(_('Access Denied.'));
class NameBlockController extends BlockController {
   protected $btTable = 'btName';
   protected $btInterfaceWidth = '400';
   protected $btInterfaceHeight = '325';
   protected $btWrapperClass = 'ccm-ui';
   public function on_before_render() {
      $lh = Loader::helper('section', 'multilingual'); 
      Localization::changeLocale($lh->getLocale(),'package_name');
   }

added the last 4 lines to the file root/packages/package_name/blocks/blockname/controller.php