I made a new class MyCHtml.php which extends CHtml.php, it overwrites the tag method to do text translation right there. But: when using MyCHtml (ex.: MyCHtml::activeLabelEx) the new tag method is not used, since it's called statically within CHtml and PHP does not yet support late static binding.
Is there a good solution to solve this problem?
I can only come up with this:
Copy CHtml to MyCHtml and do the desired changes (not good)
or change Yii so that no static calls are made anymore ($this->tag instead of self::tag) and then work with an object, one could have a static factory method, example: MyCHtml::fac()->activeLabelEx
or wait for PHP 5.3 (still have to change Yii though)