我只想运行一行没有t()的代码


I want just to run a line of code without t()

如果没有这个t(),我如何运行这行代码??

$severity_options[$severity] = t('@description', array('@description' => drupal_ucfirst($severity),

您只需要删除t函数并添加check_plain

@description变量将替换为drupal_ucfirst($severity),因此您只能对特殊字符进行编码。

$severity_options[$severity] =  check_plain(drupal_ucfirst($severity))