<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://fileformats.archiveteam.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fileformats.archiveteam.org/index.php?action=history&amp;feed=atom&amp;title=Gettext_MO_%28Machine_Object%29_file</id>
		<title>Gettext MO (Machine Object) file - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://fileformats.archiveteam.org/index.php?action=history&amp;feed=atom&amp;title=Gettext_MO_%28Machine_Object%29_file"/>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;action=history"/>
		<updated>2026-04-22T12:51:56Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.2</generator>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;diff=49818&amp;oldid=prev</id>
		<title>Lucidiot: Add Kaitai Struct schema</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;diff=49818&amp;oldid=prev"/>
				<updated>2024-12-26T17:37:42Z</updated>
		
		<summary type="html">&lt;p&gt;Add Kaitai Struct schema&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:37, 26 December 2024&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|subcat=Resources&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|subcat=Resources&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|extensions={{ext|mo}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|extensions={{ext|mo}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|kaitai struct=gettext_mo&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;From the manpage the gettext program translates a natural language message into the user's language, by looking up the translation in a message catalog.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;From the manpage the gettext program translates a natural language message into the user's language, by looking up the translation in a message catalog.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lucidiot</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;diff=39556&amp;oldid=prev</id>
		<title>Dan Tobias at 00:19, 18 March 2021</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;diff=39556&amp;oldid=prev"/>
				<updated>2021-03-18T00:19:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 00:19, 18 March 2021&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{FormatInfo&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|formattype=electronic&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|subcat=Resources&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|extensions={{ext|mo}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;From the manpage the gettext program translates a natural language message into the user's language, by looking up the translation in a message catalog.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;From the manpage the gettext program translates a natural language message into the user's language, by looking up the translation in a message catalog.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dan Tobias</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;diff=39553&amp;oldid=prev</id>
		<title>Ross-spencer: Add gettext project page</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;diff=39553&amp;oldid=prev"/>
				<updated>2021-03-17T18:49:01Z</updated>
		
		<summary type="html">&lt;p&gt;Add gettext project page&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:49, 17 March 2021&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 80:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 80:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Additional links ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Additional links ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* [https://www.gnu.org/software/gettext/ Gettext project page]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [https://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html A Quick Gettext Tutorial]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* [https://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html A Quick Gettext Tutorial]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ross-spencer</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;diff=39551&amp;oldid=prev</id>
		<title>Ross-spencer: Add details about Gettext MO files</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=Gettext_MO_(Machine_Object)_file&amp;diff=39551&amp;oldid=prev"/>
				<updated>2021-03-17T18:46:12Z</updated>
		
		<summary type="html">&lt;p&gt;Add details about Gettext MO files&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;From the manpage the gettext program translates a natural language message into the user's language, by looking up the translation in a message catalog.&lt;br /&gt;
&lt;br /&gt;
A Gettext MO file is one of two Gettext file types conveying translations in source code. A Gettext MO file is the second of two files. A first file, a [[Gettext PO (Portable Object) file]], contains strings extracted from the source code for a software application. MO files are generated from PO files. An MO file is a compiled/binary representation of the same data for use by the calling application. &lt;br /&gt;
&lt;br /&gt;
== Compiling MO files from PO files == &lt;br /&gt;
&lt;br /&gt;
Given a PO file containing translations, it can be converted to an MO file as follows once &amp;lt;code&amp;gt;gettext&amp;lt;/code&amp;gt; is installed locally, e.g. &amp;lt;code&amp;gt;yum install gettext&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The command might look as follows:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;msgfmt messages.po -o messages.mo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== File structure ==&lt;br /&gt;
&lt;br /&gt;
An [https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html excerpt from the documentation] describes the structure of MO files as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
        byte&lt;br /&gt;
             +------------------------------------------+&lt;br /&gt;
          0  | magic number = 0x950412de                |&lt;br /&gt;
             |                                          |&lt;br /&gt;
          4  | file format revision = 0                 |&lt;br /&gt;
             |                                          |&lt;br /&gt;
          8  | number of strings                        |  == N&lt;br /&gt;
             |                                          |&lt;br /&gt;
         12  | offset of table with original strings    |  == O&lt;br /&gt;
             |                                          |&lt;br /&gt;
         16  | offset of table with translation strings |  == T&lt;br /&gt;
             |                                          |&lt;br /&gt;
         20  | size of hashing table                    |  == S&lt;br /&gt;
             |                                          |&lt;br /&gt;
         24  | offset of hashing table                  |  == H&lt;br /&gt;
             |                                          |&lt;br /&gt;
             .                                          .&lt;br /&gt;
             .    (possibly more entries later)         .&lt;br /&gt;
             .                                          .&lt;br /&gt;
             |                                          |&lt;br /&gt;
          O  | length &amp;amp; offset 0th string  ----------------.&lt;br /&gt;
      O + 8  | length &amp;amp; offset 1st string  ------------------.&lt;br /&gt;
              ...                                    ...   | |&lt;br /&gt;
O + ((N-1)*8)| length &amp;amp; offset (N-1)th string           |  | |&lt;br /&gt;
             |                                          |  | |&lt;br /&gt;
          T  | length &amp;amp; offset 0th translation  ---------------.&lt;br /&gt;
      T + 8  | length &amp;amp; offset 1st translation  -----------------.&lt;br /&gt;
              ...                                    ...   | | | |&lt;br /&gt;
T + ((N-1)*8)| length &amp;amp; offset (N-1)th translation      |  | | | |&lt;br /&gt;
             |                                          |  | | | |&lt;br /&gt;
          H  | start hash table                         |  | | | |&lt;br /&gt;
              ...                                    ...   | | | |&lt;br /&gt;
  H + S * 4  | end hash table                           |  | | | |&lt;br /&gt;
             |                                          |  | | | |&lt;br /&gt;
             | NUL terminated 0th string  &amp;lt;----------------' | | |&lt;br /&gt;
             |                                          |    | | |&lt;br /&gt;
             | NUL terminated 1st string  &amp;lt;------------------' | |&lt;br /&gt;
             |                                          |      | |&lt;br /&gt;
              ...                                    ...       | |&lt;br /&gt;
             |                                          |      | |&lt;br /&gt;
             | NUL terminated 0th translation  &amp;lt;---------------' |&lt;br /&gt;
             |                                          |        |&lt;br /&gt;
             | NUL terminated 1st translation  &amp;lt;-----------------'&lt;br /&gt;
             |                                          |&lt;br /&gt;
              ...                                    ...&lt;br /&gt;
             |                                          |&lt;br /&gt;
             +------------------------------------------+&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
MO files have the magic number: &amp;lt;code&amp;gt;0x950412de&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example MO files ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/transifex/django-messages/blob/436618b9afe9c8f05a131f79564ab56f09b86a3c/django_messages/locale/ar/LC_MESSAGES/django.mo Arabic MO file for the transifex project]&lt;br /&gt;
* [https://github.com/transifex/django-messages/blob/436618b9afe9c8f05a131f79564ab56f09b86a3c/django_messages/locale/de/LC_MESSAGES/django.mo German MO file for the transifex project]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
&lt;br /&gt;
* [https://man7.org/linux/man-pages/man1/gettext.1.html Gettext manpage]&lt;br /&gt;
* [https://www.gnu.org/software/gettext/manual/html_node/Files.html Gettext files for conveying translations]&lt;br /&gt;
* [https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html Gettext MO files]&lt;br /&gt;
&lt;br /&gt;
== Additional links ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html A Quick Gettext Tutorial]&lt;/div&gt;</summary>
		<author><name>Ross-spencer</name></author>	</entry>

	</feed>