How to correctly handle date formats that needs i18n Suppose you have a date format that looks like this: "Some text Y-m-d other text H:i". Please ignore that the text needs some escaping.

What is the correct way of outputting this in a i18n friendly way?
I see that format_date attempts to do some sort of translation work, but I don't understand entirely what.

My best guess:

implode(' ', array(
  t('Some text'),
  format_date($timestamp, NULL, 'Y-m-d'),
  t('other text'),
  format_date($timestamp, NULL, 'H:i'),
);`


Is this the correct/best way?
Try something like:

$text = t("Some text @date more text @time", array(
  '@date' =&gt; format_date($timestamp, NULL, 'Y-m-d'),
  '@time' =&gt; format_date($timestamp, NULL, 'H:i'),
));


More info at:


http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7
http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/format_string/7