{"id":2908,"date":"2026-10-20T08:37:21","date_gmt":"2026-10-20T07:37:21","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/compare-and-update-po-files\/"},"modified":"2026-10-20T08:37:21","modified_gmt":"2026-10-20T07:37:21","slug":"compare-and-update-po-files","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/translations\/compare-and-update-po-files\/","title":{"rendered":"How to compare and update .po translation files"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We use Poedit for GeoDirectory translations. To find strings that are in one .po file and missing from another, or to bring an old translation up to date after a plugin update, you have two good options.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Update a translation in Poedit<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">GeoDirectory ships an English file, <code>languages\/geodirectory-en_US.po<\/code>, which lists every string in the current version. Use it as the reference:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your translation, for example <code>geodirectory-de_DE.po<\/code>, in Poedit.<\/li>\n\n\n\n<li>Choose Translation > Update from POT File and select <code>geodirectory-en_US.po<\/code> from the plugin&#8217;s languages folder. Poedit accepts .po files here as well as .pot files.<\/li>\n\n\n\n<li>Poedit adds new strings as untranslated and marks strings that are no longer used as obsolete. Translate the new ones and save.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Compare two files with gettext<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The GNU gettext command line tools can compare files directly. <code>msgcmp<\/code> reports every string in the reference file that has no translation in yours:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">msgcmp geodirectory-de_DE.po geodirectory-en_US.po<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>msgmerge<\/code> writes an updated copy of your translation with the new strings added and your existing translations kept:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">msgmerge geodirectory-de_DE.po geodirectory-en_US.po -o geodirectory-de_DE-updated.po<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save the result in Poedit to compile the .mo file, then upload it as described in <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/how-to-translate-or-localize-geodirectory\/\">how to translate or localize GeoDirectory<\/a>. If you would like to share your translation, see <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/how-to-contribute-translations\/\">how to contribute translations<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We use Poedit for GeoDirectory translations. To find strings that are in one .po file and missing from another, or to bring an old translation up to date after a plugin update, you have two good options. Update a translation in Poedit GeoDirectory ships an English file, languages\/geodirectory-en_US.po, which lists every string in the current [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,434],"class_list":["post-2908","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-translations"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=2908"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2908\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2908"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2908"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}