π‘ Tip: input as directory, output as file won't work! β
Let's say we have a folder tree like this:
.
βββ locale/
βββ a.po
βββ b.po
βββ c.poWe can specify the output path with the --output (or -o alias) option.
By providing the output to a filename a-converted.mo:
po2mo ./locale/a.po --output ./locale/a-converted.moWe can set the output filename as well:
.
βββ locale/
βββ a.po
βββ a-converted.mo <-- new!
βββ b.po
βββ c.poWhat if we want the outputs to be in the output directory?
po2mo ./locale --output ./outputThis will ensure the converted .mo files stored in the output directory:
.
βββ locale/
β βββ a.po
β βββ b.po
β βββ c.po
βββ output/ <-- new!
βββ a.mo <-- new!
βββ b.mo <-- new!
βββ c.mo <-- new!What about the --recursive option for the nested folders?
.
βββ locale/
βββ nested/
β βββ aa.po
β βββ bb.po
β βββ cc.po
βββ a.po
βββ b.po
βββ c.poNo worries, we preserve the folder structure of the nested .po files!
po2mo ./locale --output ./output --recursive.
βββ locale/
β βββ nested/
β β βββ aa.po
β β βββ bb.po
β β βββ cc.po
β βββ a.po
β βββ b.po
β βββ c.po
βββ output/ <-- new!
βββ nested/ <-- new!
β βββ aa.mo <-- new!
β βββ bb.mo <-- new!
β βββ cc.mo <-- new!
βββ a.mo <-- new!
βββ b.mo <-- new!
βββ c.mo <-- new!