Email languages

  • Posts: 75
  • Thank you received: 4
1 year 3 months ago #354944

-- HikaShop version -- : 4.7.4

I have a 2 language shop and as I seen from another posts the emails going out on the users language settings.
What happening when it's a guest checkout? Is it going out on the language they submitted the order?

What about the admin emails? If I use the This email address is being protected from spambots. You need JavaScript enabled to view it. address at the email settings, but there is not a such user then it sending in english, but that's not my native language. Can I change it, or I have to make a user with this email and set the frontend languge to my language?

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
1 year 3 months ago #354994

Hi,

What happening when it's a guest checkout? Is it going out on the language they submitted the order?

Yes, when the order is created, the current language of the user is recorded with the order. That way, the system will send the emails in that language.

What about the admin emails?

The order notification emails sent to the admin are sent in the same language as the ones for the user.

If you want to test the result easily, you can edit the emails via the menu System>Emails and use the "preview" button at the top. Select the order for which you want to test and you'll directly see the result.

There is no option to change the way it works. It is technically possible with complex custom development but you'll have to hire a developer in order to change this.

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

  • Posts: 75
  • Thank you received: 4
1 year 3 months ago #355083

I just want the admin order notification email to be the same language always...so I cannot do it with an email template override somehow?

I could make new language strings instead of the actual ones and use those, but that is a pain to do it...

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
1 year 3 months ago #355087

Hi,

so I cannot do it with an email template override somehow

With an email override, you can do some things, but it's not perfect.
At the beginning of the preload, you can add:
<?php
$lang = JFactory::getLanguage();
$currentLocale = $lang->getTag();
hikashop_loadHikashopTranslations('en-GB');
?>
and at the end:
hikashop_loadHikashopTranslations($currentLocale);
where en-GB is the language tag you want for the email.
However, this will only work for the email body, not the subject (because it is set after the body is generated) or the order status in the body (because it is loaded before the body is generated)

The following user(s) said Thank You: Petike1007

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

  • Posts: 75
  • Thank you received: 4
1 year 3 months ago #355103

That will do...thanks

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

Time to create page: 0.062 seconds
Powered by Kunena Forum