{"id":1687,"date":"2018-10-26T07:44:58","date_gmt":"2018-10-26T07:44:58","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=1687"},"modified":"2018-10-26T08:23:24","modified_gmt":"2018-10-26T08:23:24","slug":"internationalizing-the-kernel-linux-journal","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/26\/internationalizing-the-kernel-linux-journal\/","title":{"rendered":"Internationalizing the Kernel | Linux Journal"},"content":{"rendered":"<p>At a time when many companies are rushing to internationalize their products and<br \/>\nservices to appeal to the broadest possible market, the Linux kernel is<br \/>\nactively resisting that trend, although it already has taken over the<br \/>\nbroadest possible market\u2014the infrastructure of the entire world.<\/p>\n<p>David Howells recently created some sample code for a new kernel library,<br \/>\nwith some complex English-language error messages that were generated from<br \/>\nseveral sources within the code. Pavel Machek objected that it would be<br \/>\ndifficult to automate any sort of translations for those messages, and that<br \/>\nit would be preferable simply to output an error code and let something in<br \/>\nuserspace interpret the error at its leisure and translate it if needed.<\/p>\n<p>In this case, however, the possible number of errors was truly vast, based<br \/>\non a variety of possible variables. David argued that representing each and<br \/>\nevery one with a single error code would use a prohibitively large number of<br \/>\nerror codes.<\/p>\n<p>Ordinarily, I might expect Pavel to be on the winning side of this debate,<br \/>\nwith Linus Torvalds or some other top developer insisting that support for<br \/>\ninternationalization was necessary in order to give the best and most useful<br \/>\npossible experience to all users.<\/p>\n<p>However, Linus had a very different take on the situation:<\/p>\n<blockquote><p>We don&#8217;t internationalize kernel strings. We never have. Yes, some people tried to do some database of kernel messages for translation purposes, but I absolutely refused to make that part of the development process. It&#8217;s a pain.<\/p>\n<p>For some GUI project, internationalization might be a big deal, and it might be &#8220;TheRule(tm)&#8221;. For the kernel, not so much. We care about the technology, not the language.<\/p>\n<p>So we&#8217;ll continue to give error numbers for &#8220;an error happened&#8221;. And if\/when people need more information about just what _triggered_ that error, they are as English-language strings. You can quote them and google them without having to understand them. That&#8217;s just how things work.<\/p>\n<p>[&#8230;]<\/p>\n<p>There are places where localization is a good idea. The kernel is *not* one of those places.<\/p><\/blockquote>\n<p>He added later:<\/p>\n<blockquote><p>I really think the best option is &#8220;Ignore the problem&#8221;. The system calls<br \/>\nwill still continue to report the basic error numbers (EINVAL etc), and the extended error strings will be just that: extended error strings. Ignore them if you can&#8217;t understand them.<\/p>\n<p>That said, people have wanted these kinds of extended error descriptors forever, and the reason we haven&#8217;t added them is that it generally is more pain than it is necessarily worth.<\/p><\/blockquote>\n<p>Pavel still felt that, since David&#8217;s code was all new, there was no ancient<br \/>\ncruft standing in the way of implementing internationalization in this one<br \/>\nnew area. He agreed there was no point in a lot of other cases, but for this<br \/>\none, it felt like being given a fresh chance.<\/p>\n<p>But Linus said, &#8220;Really. No translation. No design for translation. It&#8217;s a<br \/>\nnasty nasty rat-hole, and it&#8217;s a pain for everybody.&#8221;<\/p>\n<p>He added, &#8220;the fact is, I want simple English interfaces. And people who<br \/>\nhave issues with that should just not use them. End of story. Use the<br \/>\nexisting error numbers if you want internationalization, and live with the<br \/>\nfact that you only get the very limited error number. It&#8217;s really that<br \/>\nsimple.&#8221;<\/p>\n<p>The discussion ended shortly thereafter. It&#8217;s a fascinating rejection of a<br \/>\nvery politically popular attitude, based on the technical consideration that<br \/>\nkeeping the programming interface simple is worth more than keeping the user interface friendly.<\/p>\n<p><a href=\"https:\/\/www.linuxjournal.com\/content\/internationalizing-kernel\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At a time when many companies are rushing to internationalize their products and services to appeal to the broadest possible market, the Linux kernel is actively resisting that trend, although it already has taken over the broadest possible market\u2014the infrastructure of the entire world. David Howells recently created some sample code for a new kernel &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/26\/internationalizing-the-kernel-linux-journal\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Internationalizing the Kernel | Linux Journal&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1687","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=1687"}],"version-history":[{"count":2,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1687\/revisions"}],"predecessor-version":[{"id":1734,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/1687\/revisions\/1734"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=1687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=1687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=1687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}