diff options
-rwxr-xr-x | bin/importgettext.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/importgettext.sh b/bin/importgettext.sh index cc01c3382..d29a318bd 100755 --- a/bin/importgettext.sh +++ b/bin/importgettext.sh @@ -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 = ''; |