diff --git a/l10n_update.check.inc b/l10n_update.check.inc index 7590875..13a58e4 100644 --- a/l10n_update.check.inc +++ b/l10n_update.check.inc @@ -86,6 +86,18 @@ function l10n_update_build_updates($history, $available) { if (_l10n_update_source_compare($current, $update) == -1 || $current->version != $update->version) { $updates[$name][$lang] = $update; } + // Fallback: if no translation found, try to download the parent language + // This is done by inferring that the language is a regional language. + // P.e. if the language is 'es-CO' (Colombia Spanish), try to download 'e + if (!$update) { + $trail = explode('-', $lang, 2); + $parent_lang = $trail[0]; + $source = l10n_update_source_build($project, $parent_lang); + if ($update = l10n_update_source_check($source, $check_local, $check_re + $source->language = $update->language = $lang; + $result[$name][$lang] = $update; + } + } } } }