Resgister reward email always in default language instead of user front language - multilingual site


  • Default avatar
    wen127    
     4 months ago
    0

    Hi Seyi,

    I have a multilingual site English(default) / Japanese. Everything is configured and work well. The email templates are set in English and Japanese. The Invitation Page Description is set as well and shows properly in both language.

    The rule: 

    When a new user registers from a "Registration Link" from the existing member, there would be an email with a coupon code sent to the user after the user confirms register by activation URL.


    The issue:

    If this new user registration page is in Japanese, the activation email sent from the system is in Japanese, which is correct.
    However, when AwoReward triggers the register rule and sends the email with the coupon code, that email is still in English.


    Could you help me to fix the issue?


    Joomla 4.3.4

    AwoCoupon 4.0.1.1

    AwoRewards 4.0.0.7

    PHP 8.1

  • Your avatar
    seyi    
     4 months ago
    0

    Hello,

    I did some testing on this, and found that even on a multilingual site, unless the user explicitly sets their language, joomla does not set the user language on registration, regardless of if registering on English registration or some other language.  Since the user registration needs activation, it means Aworewards gets called through cron, and not the active session the user is on.  In this case, AwoRewards looks at the language set in the user profile.  If it finds it is blank, the language used is the sites default.

    So I think you would need to expose the language dropdown during registration and let users select it.  This option is found in admin > users > manage > options > first tab (User Options), and set "Frontend Language" to "show".

    If you did not want to show that parameter, the other thing you could do is write a plugin to auto select their language on registration.  Did do a quick search on joomla extension, could not find an already existing plugin for this.

  • Default avatar
    wen127    
     4 months ago
    0

    I did already tried to expose the language dropdown during registration and make sure to select a language other than default (Japanese in this case).

    But I still get the coupon email in English.

  • Your avatar
    seyi    
     4 months ago
    0

    Hello,

    I am not able to produce an issue when testing this locally, it works fine for me.  I am happy to have a look at your setup if you can sent a private message with access.
  • Default avatar
    wen127    
     4 months ago
    0

    I just PM you, thanks for helping.