$report = array(
'skips' => 0,
'updates' => 0,
'deletes' => 0,
'additions' => 0
);
$textgroup = 'default';
$langcode = 'fr';
$mode = LOCALE_IMPORT_OVERWRITE;
$location = $context = '';
$strings = array(
array(
'source' => "The specified file %name could not be uploaded.",
'translation' => "Le document %name ne peut pas être ajouté.",
),
array(
'source' => "Only files with the following extensions are allowed: %files-allowed.",
'translation' => "Seuls les fichiers avec les extensions suivantes sont autorisés: %files-allowed.",
),
);
foreach ($strings as $item) {
_locale_import_one_string_db($report, $langcode, $context, $item['source'], $item['translation'], $textgroup, $location, $mode);
}
cache_clear_all('locale:', 'cache', TRUE);