Jump to content

Why there is no "l()" method in FrontControllerCore


jack2684

Recommended Posts

In AdminControllerCore, there is a method:

protected function l($string, $class = null, $addslashes = false, $htmlentities = true)
{
  ...
}

I think it is used for translation. I am curious about why there is no such function in FrontController? Doesn't also important to support multi-language in the front?

Link to comment
Share on other sites

Me too... it's supposed that in the FrontOffice you can translate everything in the tpl files, whereas some content in the back office is generated by helpers so you don't have a tpl file.

 

But when I've needed translation in the FrontOffice controllers (overriding for example) I've used the Translate class for modules translations.

for example


................
include_once(_PS_MODULE_DIR_.'pele_scb_disponibilidad/pele_scb_disponibilidad.php');
$pele_Scb_disponibilidad=new Pele_Scb_disponibilidad();

$deliveryDayStr=Translate::getModuleTranslation($pele_Scb_disponibilidad->name,'Tomorrow',$pele_Scb_disponibilidad->name);
Edited by Enrique Gómez (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...