Make a single file from loose .po files
Last modified: March 4, 2009 - 19:04
If you want to make a single po file from a CVS folder or a downloaded module from containing all the small .po files, the following commands will do.
UNIX
You should execute this (from a shell prompt) in the folder with the .po files.
$ msgcat --use-first general.po [^g]*.po | msgattrib --no-fuzzy -o nl.poOf course, you should change nl into your own language code.
WINDOWS
Open the "Command Prompt" and type in the folder with the .po files.
for %f in (*.po) do type "%f" >> module.po
single po file to multiple module files
For those of you looking to split the large .po file into its respective module files:
http://drupal.org/node/11311
Combining all nl.po files
Combining all nl.po files (*nix only) from the root of your Drupal installation:
cat `find . -name *.nl.po` > total.po. Then import into the corresponding language (here Dutch as the prefix is 'nl').Is there anything Bash can't do?
Thank you so much for this snippet. My colleague and I were having the same problem as the one described at http://drupal.org/node/239477. We had to do it manually and merging all the content into one PO file using your command saved us a lot of time!
Rémi
remiplourde.com