LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-22-2020, 04:58 AM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,679
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
How does the kernel deal with foreign languages?


The question just floated into my mind yesterday and I couldn't find an answer on DDG. Userspace programs use gettext to retrieve messages by their accession number from an external file located in the /usr/share/locale tree. You can translate that file into other languages and hang them on appropriate twigs of the tree et voila a multilingual program.

But the kernel doesn't use external libraries. Does that mean that non-English speakers have to use English to make sense of dmesg output or logs?
 
Old 12-22-2020, 06:14 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,448

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Got there before you. Yes, that problem goes back way before linux. Some quotes may help:
Quote:
"I think there is a world market for maybe five computers." -- Thomas Watson, chairman of IBM, 1943.

"I have traveled the length and breadth of this country and talked with the best people, and I can assure you
that data processing is a fad that won't last out the year." - Editor of business books, Prentice Hall, 1957.

"But what...is it good for?"
-- Engineer at the Advanced Computing Systems Division of IBM, 1968, commenting on the microchip.

"There is no reason anyone would want a computer in their home."
-- Ken Olson, president, chairman and founder of Digital Equipment Corp., 1977.
It wasn't technically possible to have hundreds of languages on a disk somewhere or hundreds of kernels with differently coded errors. I use a website with 1027 languages on it at the moment and know the decades of work and consistent labour that has gone into getting it that way.

The problem is, most of the advances were in the Excited States; and if you'll forgive another lame quote
Quote:
War is God's way of teaching Americans geography. - Ambrose Bierce
 
Old 12-22-2020, 07:12 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,762

Rep: Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762
The Kernel "understands" machine code as it's natural language, because that is ALL that is supported by the underlying hardware. ANY human language is a translation or simple data. The movement to support ALL human languages equally has been ongoing for some time and has been remarkably successful. Note that the Kernel is only ONE part of the distribution, and not ALL parts have achieved the same level of success in this regard. The work goes on.
.
 
Old 12-22-2020, 07:20 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,679

Original Poster
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
Obviously no computer program "understands" English. But what I meant was: "Is there any way the kernel messages can be made comprehensible to people who speak foreign languages?". After all, other programs produce their output in the user's native language. Is there any way the kernel can do that?

Last edited by hazel; 12-22-2020 at 07:22 AM.
 
Old 12-22-2020, 07:33 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,349
Blog Entries: 3

Rep: Reputation: 3766Reputation: 3766Reputation: 3766Reputation: 3766Reputation: 3766Reputation: 3766Reputation: 3766Reputation: 3766Reputation: 3766Reputation: 3766Reputation: 3766
I did translations for a user-space program which was very popular back in its day. That was constant effort to keep up to date. Then magnify that by N languages + some coordinators to keep everyone on the same page. Then amplify that yet again by the rate of change in the kernel.

The user-space components of the system do multiple languages by adding several additional layers of abstraction on top of the abstractions that make the program go. In contrast, the kernel is as close to the hardware as you can get, so in its base mode you have only one set of strings. There was a morse code module so that could be made all big and complicated and provide a translation. However since the language of ICT development is in English, other languages would just add overhead. That and you'd have a constant effort to keep it up to date. There are more useful things skilled, technical translators can work with. It's easier for a developer to train up into decent language skills than it is to manage teams of translators.

If a big and important enough project is done in Mandarin only, then we'll see a shift, possibly suddenly. But then we'll see something rather similar, a single-language core with single-language work flow and communication.
 
Old 12-22-2020, 02:37 PM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,448

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
What probably could be done is translations of /usr/include/errno.h and /usr/include/<various>/errno.h, not forgetting the few errno-base.h files in various places. They get you translations of numbered system errors.

But kernels are a different animal. I don't fancy trying to get any coder to translate errors into major languages, never mind minor ones.
 
Old 12-22-2020, 02:49 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by hazel View Post
Obviously no computer program "understands" English. But what I meant was: "Is there any way the kernel messages can be made comprehensible to people who speak foreign languages?". After all, other programs produce their output in the user's native language. Is there any way the kernel can do that?
Personally I prefer to keep it in English (and why not, all programming languages are essentially English, too).
Translation will never be perfect and just introduce another level of possible misinterpretation.
I mean, everybody knows what "segfault" or SIGKILL means - now, start translating that into other languages - it gets really, really confusing really, really fast. No thanks.

Just look at us humans asking for commands to be executed with LC_ALL=C prepended. Now imagine computer programs, log parsers etc. being in the same situation.

I know I speak from a place of complacency because my English isn't too bad, but still: I believe for people to learn at least some "computer english" is the far better choice.
 
Old 12-22-2020, 04:48 PM   #8
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hazel View Post
"Is there any way the kernel messages can be made comprehensible to people who speak foreign languages?"
I doubt it's comprehensible for native English speakers.

In my opinion, it's not a techmical problem. One could add message catalogs to the kernel, which would inflate its size. It would be a nightmare to troubleshoot problems in a kernel that speaks Lithuanian or Vietnamese, though. I suppose people who deal with kernel messages can be expected to know enough English, so that the pressure to translate thrm to another language is pretty weak anyway.
 
Old 12-23-2020, 05:34 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,448

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
I suppose the only way to attempt it is to assign a numeric code to each error.
So you would get
Quote:
27AC: Invalid Key/value pair in file /etc/udev/several/unneccessary/directories/buried/deep/in/some/abyss/file
and this could be looked up online for a translation.

But just looking at dmesg|less here, it's the output that lets you know what's going on. The output sets the context - the output tells you what's happening, the errors tell you what's not happening. And without the two, you'd never be able to figure out what worked, which is essential for diagnostics.

The danger of anyone doing translations into even the main colonial languages is slim. The danger of doing it properly is non existent. We all know English - but there are many dialects of Pidgin English. Our lot translates 5 dialects of Chinese, not just the Mandarin you normally think of as chinese, 4 dialects of Arabic, and 5 dialects of pidgin English. Then, also, as the latest videos are not necessarily translated yet, the website has to be constantly revised and adjusted for the videos that are ready to be used.
 
Old 12-23-2020, 06:18 AM   #10
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,762

Rep: Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762
Quote:
Originally Posted by business_kid View Post
I suppose the only way to attempt it is to assign a numeric code to each error.
So you would get and this could be looked up online for a translation.

But just looking at dmesg|less here, it's the output that lets you know what's going on. The output sets the context - the output tells you what's happening, the errors tell you what's not happening. And without the two, you'd never be able to figure out what worked, which is essential for diagnostics.

The danger of anyone doing translations into even the main colonial languages is slim. The danger of doing it properly is non existent. We all know English - but there are many dialects of Pidgin English. Our lot translates 5 dialects of Chinese, not just the Mandarin you normally think of as chinese, 4 dialects of Arabic, and 5 dialects of pidgin English. Then, also, as the latest videos are not necessarily translated yet, the website has to be constantly revised and adjusted for the videos that are ready to be used.
Actually all messages ARE numbers internally. The string is assigned and pushed for that number in an extra step. That step is the only one that must be able to select the local language string for that number.
Abstraction is the way to go, but that implies additional resources, possibly external to the kernel.
(or a larger kernel containing a library of translations) as has been noted. If the translations are external, there still must be a code and translation for (the language translation failed or the resource is unavailable. Chicken/egg?) No one said this was EASY!
In addition there are at LEAST a dozen dialects of English ASIDE from the only CORRECT one that originates in, and used only by, England in the UK. There is no good reason to select one, or only one, even for translation to that ONE language. Luckily, the number of translations needed by the kernel prior to the loading of a language specific interface are far more limited than common language usage. (Arguably the phrase "toilet backed up" may be a comment but never need translation or display by the kernel!)

As I said, the work goes on. The only debate is the extent to which this is a problem that needs to be resolved. Other approaches include a log file translator (making the dmesg command, as an example, automagically translate the log to the local language). I feel that resolving it will be a good thing, and clearly many people agree. I also feel that no one person working alone is likely to reach a solution acceptable to the entire community, it requires a consensus.

These are the kinds of problems that keep discussion going at the maintainer and developer level, causes both diverse and consolidated solutions, and push improvement.

Isn't community wonderful?
 
Old 12-23-2020, 08:53 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,448

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
ROTFL.

England - the 'only correct one?' Which only correct one do you mean? Apart from the few remaining toffe-nosed aristocracy,[as in 'Yes miDear…haw haw'], you have the East London accent [as in My Fair Lady "Awl I won t-is a rooim some wheyre"] or Cockney slang ['My trouble & strife has just gone to change her Alan Whickers'] and the Midlands and 'Jordie' Northern accents are completely different. Every county has it's own manner of speaking.

It's this bad: When I first went to England, I had great difficulty understanding them, and they couldn't understand me at all. So, in Birmingham where I was, I had to imitate or parody them. I was laughing at them, but I had to fool them to get served in the shops.
 
Old 12-23-2020, 02:19 PM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by business_kid View Post
The danger of doing it properly is non existent.
Oh god, what a mind-twister.
I'm still not 100% sure I understand what you're saying there.
 
Old 12-24-2020, 11:28 AM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,448

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Bottom line: There's more English accents in England than you'd believe. The same in Ireland, incidentally, but we sort of understand each other. In England there was less travel, it seems so areas developed very different sounding accents.

Ireland is likewise, but we can laugh at it. Here's what I mean https://www.youtube.com/watch?v=8nY7jHj7Gh0

That video is a bit long, but we like the sound of our own voices here

Last edited by business_kid; 12-24-2020 at 11:29 AM.
 
Old 12-24-2020, 11:49 AM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
It gets stranger when you have a country with only 5 million inhabitants, and still more than a handful of dialects.
And what about Iceland? Half a million people, how many dialects?

[- Oh and sorry for bringing this even further off topic, but I recently watched a South Park episode where Oprah Winfrey's minge suddenly started complaining in some british (I think) dialect, and Gary, its close neighbour, in another - calling it "Mingey" - I laughed so hard... maybe you can identify those dialects to me? -]
 
Old 12-25-2020, 05:53 AM   #15
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,448

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Er, accents implies we understand each other - we just think the other guy sounds weird, and vice versa.

Dialects imply we don't necessarily understand them. England had a succession of Invaders That's why English is such a bitch of a langauge to learn. The Roman Emperor Hadrian even built a wall to keep out the (Celtic)Scots. There was also the Angels(with a hard 'g'), the Saxons, The Vikings, The Normans. Then words have been imported directly from nearly all the available languages, French, Spanish, Germans, even Italians. And they're only the words I recognize!

And not only were the Brits invaded more, but their kings and queens seemed less fertile (Certainly the Tudors, Stuarts, Hanoverians), and they always seemed to be asking some unlikely nearest relative to come to England and take the ugly job of being king/queen without checking the relevant biological functions. Mind you, the Latest lot (the Windsors) seem finally to have that licked.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I use foreign languages on Gentoo? jroussel Linux - Newbie 14 03-02-2005 02:46 AM
How to view foreign languages? JunZ Linux - Newbie 1 05-31-2004 07:49 AM
viewing text in foreign languages h/w Linux - General 8 04-14-2004 09:49 PM
How can I set to type with foreign languages(special characters most) petru_b16 Linux - Software 1 07-27-2003 03:32 PM
How To DELETE KDE FOREIGN LANGUAGES SUPPORT? javacvb Linux - Newbie 1 05-22-2003 11:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration