I am writing custom module in order to verify customers mobile number before checkout if the cart have products from specified type.
The message body sent to mobile operator passed to translation function
$messageContent = __('Use that code to verify').': '.$verifyCode;
The string have been translated in csv file but when I use like this to send http request to SMS gateway server it goes to the mobile like below:
{{{TRANSLATED_STRING}}{{TRANSLATED_STRING}}{{ENGLISH_STRING}}{{THEME_KEY}}}
How can I get the string for every store view in code
Edit:
After @Max Stsepantsevich answer I turned off the inline translation and now I get only the English string.
I have that line in my custom module to translate
"Use that code to verify ","أستخدم هذا الكود للتفعيل ",module,Magento_Bundle
I added the following piece of code to emulate the store view but still get the english only see below:
$resolver = $this->om->get('\Magento\Framework\Locale\Resolver');
$resolver->emulate('2');//store view id
$content = urlencode(__('Use that code to verify '). $verifyCode);
$sender->send($content);
$resolver->revert();
Thanks in advance