{"id":1874,"date":"2009-07-26T15:19:36","date_gmt":"2009-07-26T13:19:36","guid":{"rendered":"http:\/\/blog.ginchen.de\/?p=1874"},"modified":"2009-08-10T15:23:28","modified_gmt":"2009-08-10T13:23:28","slug":"komische-fehlermeldung-in-poedit","status":"publish","type":"post","link":"http:\/\/blog.ginchen.de\/en\/2009\/07\/26\/komische-fehlermeldung-in-poedit\/","title":{"rendered":"Strange error message in Poedit"},"content":{"rendered":"<p>I&#8217;m currently working on a PHP project that needs to offer possibilities of internationalization, i.e. the application should be translatable into any language with minimal effort. Since I had already come to know the mechanics of <a  rel=\"external\" href=\"http:\/\/de.wikipedia.org\/wiki\/GNU_gettext\"><code>gettext<\/code><\/a> from WordPress and was highly enthralled by its simpleness and effectivity, I decided to use this system for my project, too. It worked out very well, and I can only recommend <code>gettext<\/code> to anyone who wants to develop a multilingual application!<\/p>\r\n\r\n<p>However, when I wanted to have Poedit parse my files for text blocks, I always got the following error message:<\/p>\r\n\r\n<blockquote><p>Execution of command &#8216;dxgettext &#8211;so &#8220;C:\\***\\Temp\\poe***.tmp&#8221; &#8220;some\/path\/file.inc&#8221;&#8216; failed (error 2: the system cannot find the file specified.)<\/p><\/blockquote>\r\n\r\n\r\n<!--more-->\r\n\r\n\r\n\r\n\r\n<p>Meanwhile I have found the mistake &#8211; but since I was not able to find a solution via Google when I needed it, I&#8217;ll just write it down here for anyone who may look for it in the future.<\/p>\r\n\r\n<p>Considered in hindsight, the error message explains everything: Poedit has tried to apply the command <code>dxgettext<\/code> to one of my include files (<code>file.inc<\/code>), but no program called <code>dxgettext<\/code> could be found on the computer. And why should it &#8211; <code>dxgettext<\/code> is the gettext parser for the programming language Delphi, which I have not installed. After all, I&#8217;m writing my script in PHP, not in Delphi. Poedit however thinks by default that all files with the extension <code>.inc<\/code> are Delphi files and therefore tries to parse them with <code>dxgettext<\/code>.<\/p>\r\n\r\n<h3>Solution<\/h3>\r\n\r\n<figure id=\"attachment_2084\" aria-describedby=\"caption-attachment-2084\" style=\"width: 200px\" class=\"wp-caption alignright\"><a href=\"http:\/\/blog.ginchen.de\/wp-content\/uploads\/2009\/08\/poedit-parser-optionen.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.ginchen.de\/wp-content\/uploads\/2009\/08\/poedit-parser-optionen-200x124.jpg\" alt=\"Poedit parser options\" title=\"Poedit parser options\" width=\"200\" height=\"124\" class=\"size-thumbnail wp-image-2084\" srcset=\"http:\/\/blog.ginchen.de\/wp-content\/uploads\/2009\/08\/poedit-parser-optionen-200x124.jpg 200w, http:\/\/blog.ginchen.de\/wp-content\/uploads\/2009\/08\/poedit-parser-optionen-300x186.jpg 300w, http:\/\/blog.ginchen.de\/wp-content\/uploads\/2009\/08\/poedit-parser-optionen.jpg 878w\" sizes=\"(max-width: 200px) 100vw, 200px\" \/><\/a><figcaption id=\"caption-attachment-2084\" class=\"wp-caption-text\">Poedit parser options<\/figcaption><\/figure>\r\n\r\n<p>There are two possibilities:<\/p>\r\n<ol>\r\n<li>Simply rename the problematic <code>file.inc<\/code> to something that Poedit will recognize as PHP file, for example <code>file.inc.php<\/code>.<\/li>\r\n<li>Tell Poedit not to handle <code>.inc<\/code> files as Delphi files anymore. For this purpose, just go to &#8220;File&#8221; &rarr; &#8220;Preferences&#8221; &rarr; &#8220;Parser&#8221; &rarr; &#8220;Delphi&#8221; and remove the extension <code>*.inc<\/code> from the list. Now Poedit will ignore all <code>.inc<\/code> files.<\/li>\r\n<\/ol>","protected":false},"excerpt":{"rendered":"I&#8217;m currently working on a PHP project that needs to offer possibilities of internationalization, i.e. the application should be translatable into any language with minimal effort. Since I had already come to know the mechanics of gettext from WordPress and was highly enthralled by its simpleness and effectivity, I decided to use this system for [&hellip;]","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[76],"tags":[388,386,387,84,122,385,82],"_links":{"self":[{"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/posts\/1874"}],"collection":[{"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/comments?post=1874"}],"version-history":[{"count":23,"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/posts\/1874\/revisions"}],"predecessor-version":[{"id":2086,"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/posts\/1874\/revisions\/2086"}],"wp:attachment":[{"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/media?parent=1874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/categories?post=1874"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.ginchen.de\/en\/wp-json\/wp\/v2\/tags?post=1874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}