{"id":59,"date":"2008-08-01T12:30:00","date_gmt":"2008-08-01T17:30:00","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=59"},"modified":"2008-09-19T17:01:08","modified_gmt":"2008-09-19T22:01:08","slug":"the-__-function-in-php","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2008\/08\/the-__-function-in-php\/","title":{"rendered":"The __ function in PHP"},"content":{"rendered":"<p><img decoding=\"async\" style=\"max-width: 800px;\" src=\"https:\/\/osric.com\/chris\/accidental-developer\/wp-content\/uploads\/2008\/08\/php.gif\" align=\"right\" \/>Recently I bumped into a function I wasn&#8217;t familiar with in PHP, It looked like the app I was working in was wrapping just about every constant that they used in the __ function. (Yes, that is two underscores.)<\/p>\n<p>It turns out that this is actually an abbreviation for the <a href=\"http:\/\/www.gnu.org\/software\/gettext\/manual\/gettext.html\">gettext<\/a> function, which is for allowing your application to support multiple languages. I think that this is a very clean way to support multiple languages (though admittedly, I haven&#8217;t read it very carefully yet), but I really do think that a better function abriviation could have been chosen. Oh, well, I suppose you learn something new every day.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I bumped into a function I wasn&#8217;t familiar with in PHP, It looked like the app I was working in was wrapping just about every constant that they used in the __ function. (Yes, that is two underscores.) It turns out that this is actually an abbreviation for the gettext function, which is for &hellip; <a href=\"https:\/\/osric.com\/chris\/accidental-developer\/2008\/08\/the-__-function-in-php\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The __ function in PHP<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":2,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":80,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/59\/revisions\/80"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}