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

pull/17/head
Thomas Bruederli 12 years ago
parent 8526ac991e
commit 35a35d1370

@ -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