jack2684 Posted March 19, 2014 Share Posted March 19, 2014 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 More sharing options...
Enrique Gómez Posted March 19, 2014 Share Posted March 19, 2014 (edited) 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 March 19, 2014 by Enrique Gómez (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now