Get language code from filename if not specified in the .po file itself (#1488478)

pull/7/head
Thomas Bruederli 13 years ago
parent 76e499e8a1
commit ae4bad986b

@ -99,6 +99,10 @@ function import_file($fn)
$language = '';
$translator = '';
// get language code from file name
if (preg_match('/-([a-z_]+).po$/i', $fn, $m))
$language = expand_langcode($m[1]);
$is_header = true;
$msgid = null;
$msgstr = '';

Loading…
Cancel
Save