{"id":357,"date":"2012-02-16T22:59:44","date_gmt":"2012-02-17T03:59:44","guid":{"rendered":"http:\/\/littlesvr.ca\/grumble\/?p=357"},"modified":"2012-12-05T00:50:27","modified_gmt":"2012-12-05T05:50:27","slug":"language-codes-part-1","status":"publish","type":"post","link":"http:\/\/littlesvr.ca\/grumble\/2012\/02\/16\/language-codes-part-1\/","title":{"rendered":"Language codes, part 1"},"content":{"rendered":"<p>While analyzing the files I got from Debian I ran into a lot of language codes that weren&#8217;t <a href=\"http:\/\/littlesvr.ca\/grumble\/2011\/12\/09\/scraping-data-from-a-reliable-source\/\">in my database already<\/a>.<\/p>\n<p>It was an interesting exercise, involving me learning about the existence of languages such as <a title=\"Javanese language\" href=\"http:\/\/en.wikipedia.org\/wiki\/Javanese_language\">Javanese<\/a> and countries that I already forgot about.<\/p>\n<p>The problem is that some of the language codes are redundant, including the country code even though the language is the default for that particular country. For example el_GR means Greek from Greece, no kidding.<\/p>\n<p>I don&#8217;t have el_GR in my database and see no point in adding it. So for Debian translation files that are identified as el_GR I have a hardcoded if(el_GR)replacewith(el). I&#8217;ve got about 72 such replacements that I had to figure out one by one.<\/p>\n<p>A smaller set of language\/country combo codes I did add to the database, such as English from Canada, South Africa, Ireland (not kidding); Catalan from Italy and Andorra, Arabic from Oman and Egypt, French from Luxembourg.<\/p>\n<p>I just wanted to make a note of this, because it took me a hell of a long time to look through the list of unknown codes, figure out what they stand for, and whether they deserve a country specific version or not.<\/p>\n<p>There will be a lot more work needed to clean up the list of PO files from Debian, so this post was just part 1 of hopefully not too long a series.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While analyzing the files I got from Debian I ran into a lot of language codes that weren&#8217;t in my database already. It was an interesting exercise, involving me learning about the existence of languages such as Javanese and countries that I already forgot about. The problem is that some of the language codes are &hellip; <\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-andrew","4":"post-357","6":"format-standard","7":"category-ostd","8":"category-safeforseneca"},"_links":{"self":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":4,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":599,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/357\/revisions\/599"}],"wp:attachment":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}