What are the different gettext file formats used for? -


i started trying translate few of used text entries in c program using gettext, when digging got little bit confused different file formats since there seems overlap in functionality?

i overview of different formats

  • .po
  • .pot
  • .mo
  • .gmo
  • (other formats have excluded?)

and learn

  • what normal workflow?
  • what file format contain?
  • what tools typically used?
  • what "opposite" direction conversions possible (1)?

(1) know msgunfmt can convert .mo .po, since .mo final end format assume not lossless process. i.e. if convert hello1.mo hello2.po , convert hello2.po hello3.mo, assume hello1.mo , hello3.mo contain identical language strings meta information lost along way, right?

i wrong but:

.pot - human readable gettext template file - give translator (person?).

.po - human readable gettext translated file based on pot - translator gives back.

.mo - machine readable code (bytecode?) used php when doing actual translation. format feed php. it's generic format understood programs might not support gnu gettext features. gmo comes in place.

.gmo - files ending .gmo mo files, when known these files use gnu format.


you can use poedit handle .pot -> .po -> .mo

more info

p.s. being said - programmers call formats po or xml human-readable. - won't need convert .mo .po...well..at least doesn't seem common scenario me :)


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -