Change record status: 
Project: 
Introduced in branch: 
8.x, 7.x
Introduced in version: 
8.0, 7.8
Description: 

t() is not just a translation function in Drupal, it also provides replacement and security features. Now you can use format_string() (Drupal 7) or SafeMarkup::format() (Drupal 8) to apply the same placeholder and security features but without the translation, if your use case needs that functionality.

Before

// "Translate" to 'en' to ensure no translation (in D7 and before).
$not_translated = t('Email %user', array('%user' => $user->name), array('langcode' => 'en'));

After (in Drupal 7.x)

// No translation happening here.
$not_translated = format_string('Email %user', array('%user' => $user->name));

After (in Drupal 8.x)

use Drupal\Component\Render\FormattableMarkup;
// No translation happening here.
$not_translated = new FormattableMarkup('Email %user', array('%user' => $user->name));

You can also use Drupal.formatString() in Javascript similarly. This can be useful for cases when you had the string translated earlier and the replacement values only became available later.

Impacts: 
Module developers
Themers