How to access oxRegistry classes from a Template file?

Upon creating a new module, how could one access from within a Template file the class instances returned by the oxRegistry getter methods (getLang, getConfig, etc)?

Supposedly one would want to access the translateString function from oxLang:

oxRegistry::getLang()->translateString('MY_TRANS', 'MY_LANG');

Is there a way to do it directly from the Template file without having to write a wrapper in the controller?


    public function translateString($sStringToTranslate, $iLang = null) {
        return oxRegistry::getLang()->translateString($sStringToTranslate, $iLang);
    }

…and without having to use the [{php}] tags in the Template?

Thank you in advance for any help/advice on this.

[{oxmultilang ident=“MY_TRANS”}]

Thanks for the quick reply.

However, as I stated in the initial post, I’m looking for a way to access the classes returned by oxRegistry, and not just the specific scenario handled by smarty_function_oxmultilang.

I guess then the only generic way would be to use a wrapper maybe inside a class extending oxcmp_utils / UtilsComponent.