Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29893

Drupal 8: Notify message is not translated

$
0
0

I am using message& message_notify contrib module.

I have enabled language module, It has By default English (en), Korean (ko), Japanese (ja).

I have translate below template in Japanese language as well.

  $language = 'ja';
  $message = Message::create([
    'template' => 'sample_template',
    'langcode' => $language
  ]);

  $message->setLanguage($language);

  $message->save();

  $message = $message->getTranslation($language);

  $notifier = \Drupal::service('message_notify.sender');
  $result = $notifier->send($message);

When I am trying to send email it always sending in English, rather than Japanese.

Am I missing something in Language configuration?


Viewing all articles
Browse latest Browse all 29893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>