How to import translated strings having dynamic variables? Short: How can I import .po file having dynamic variables in strings like follows

$message = t('Hi @firstname, please follow @sitelink or mail me at @email ', $var);


Indetail:

I've written a custom module to send mail notification to users. In that module $message string has dynamic variables like follows (sample)

$var = array('@firstname' =&gt; $username, '@sitelink' =&gt; $GLOBALS['base_url'], @email =&gt; $email);  
$message = t('Hi @firstname, please follow @sitelink or mail me at @email ', $var);


How can I import $message string to my site. 

I could translate all the static strings to Spanish of other custom modules like follows. 

#: mycustom.module
msgid "Are you sure to approve"
msgstr "¿estás seguro de aprobar"


But how can I write the same for Dynamic variables. Right now Spanish Users are getting their mail in English?

Note: I'm just using Drupal core Locale module.
There are two way to achieve this

Add string in a your .po file like follows

msgid "Hi @firstname, please follow @sitelink or mail me at @email"
msgstr "Hola @firstname, por favor, siga @sitelink o envía un email al @email"


and import that .po file by going 


  Administration » Configuration » Regional and language » Translate interface » Import



 If you want to change individual translated strings go to 


  Home » Administration » Configuration » Regional and language »
  Translate interface » Translate


You can find list of strings there each having edit link beside. So you change the individuals like follows.



Hope this helps someone.