No language override in email

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 4 weeks ago #28077

If you personalise any text, it shows up correctly in the website, but any language overrides that are in emails do not show up correctly. It always shows the original text. For example

HI_CUSTOMER="Hi %s,"

we have change to,

HI_CUSTOMER="Hello %s,"

It sends out emails with the greeting Hi.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 weeks ago #28078

Language overrides cannot work in emails on joomla 1.6.0 and higher. That's because of the restrictions put in place in the Joomla library and there is nothing we can do about that.
If you just use one language, you should make your modifications directly in the email via the menu System->Emails.

Please Log in or Create an account to join the conversation.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 4 weeks ago #28085

And is this the same for Joomla 1.5.24?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 weeks ago #28086

No, it should work with 1.5

Please Log in or Create an account to join the conversation.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 3 weeks ago #28502

Just been checking. It is not working in 1.5. Where should I be looking in the code? Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 3 weeks ago #28521

It's in the function loadOrderNotification of the file administrator/components/com_hikashop/classes/order.php where the email is loaded.

Normally, the override is done automatically in joomla 1.6 and manually on 1.5 in the file amdinistrator/components/com_hikashop/helpers/helper.php :
$lang =& JFactory::getLanguage();
$override_path = JLanguage::getLanguagePath(JPATH_ROOT).DS.'overrides'.DS.$lang->getTag().'.override.ini';
if(version_compare(JVERSION,'1.6','=')&&$app->isAdmin() && file_exists($override_path)){
$lang->override = $lang->parse($override_path);
}
$lang->load(HIKASHOP_COMPONENT,JPATH_SITE);
if(version_compare(JVERSION,'1.6','<') && file_exists($override_path)){
$lang->_load($override_path,'override');
}

However, on joomla 1.6.1 and higher, the override system cannot be called from the back end. So all the backend and the emails sent from the back end cannot use the overridden translations.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum