1.20.x gettext.inc | _locale_import_message($message, $file, $lineno = NULL) |
Sets an error message if an error occurred during locale file parsing.
Parameters
$message: The message to be translated.
$file: Backdrop file object corresponding to the PO file to import.
$lineno: An optional line number argument.
Related topics
File
- includes/
gettext.inc, line 355 - Gettext parsing and generating API.
Code
function _locale_import_message($message, $file, $lineno = NULL) {
$vars = array('%filename' => $file->filename);
if (isset($lineno)) {
$vars['%line'] = $lineno;
}
$t = get_t();
backdrop_set_message($t($message, $vars), 'error');
}