By default xgettext
will guess file type from its extension. However, I have JavaScript files (with .js
extension) which it doesn't currently understand. So, I have to specify language manually, Java seems like a good choice. But then, I also have Glade files (XML), which obviously cannot be parsed as Java... When I specify multiple --language
options on command line, only the last seems to have any effect.
It seems to be a non-issue for projects with file types understood by xgettext (e.g. C and Glade).
It seems that --join-existing
option is what I need. I.e. run xgettext
separately for each language with the same output file, only adding --join-existing
for each but the first. Note that if output file doesn't have suffix .pot
, xgettext
will print a (useless) warning about charset.