Share on Facebook Share on Twitter Email
Answers.com

polyglot

 
Dictionary: pol·y·glot   (pŏl'ē-glŏt') pronunciation
adj.
Speaking, writing, written in, or composed of several languages.

n.
  1. A person having a speaking, reading, or writing knowledge of several languages.
  2. A book, especially a Bible, containing several versions of the same text in different languages.
  3. A mixture or confusion of languages.

[French polyglotte, from Greek poluglōttos : polu-, poly- + glōtta, tongue, language.]

polyglotism pol'y·glot'ism or pol'y·glot'tism n.

Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Wordsmith Words: polyglot
Top

(POL-ee-glot)

adjective
1. Conversant in many languages.
2. Composed of or having several languages. (as in a book, a population, etc.)
3. Encompassing diversity (as in culture or origin).

noun
1. One who is competent in many languages.
2. A book having the same text in several languages.
3. A mixture or confusion of languages.

Etymology
From Greek polyglottos, from poly- (many) + glotta (tongue, language), The words gloss, glossary, and glottis are derived from the same root

Usage
"For decades, New York has been the province of street photographers who have sought the downtrodden, the troubled or the eccentric among the city's polyglot populace." — Mary Abbe; Picture Perfect; Star Tribune (Minneapolis, Minnesota); Jun 4, 2004.

"Valiani, the man, is a cultural polyglot. He's a Seattle-born Italian who looks like a Boston Irishman who's married to a Nebraskan he met in Los Angeles." — Grand New Menu Chef Knows What Kansas Citians Like; Kansas City Star; Jun 18, 2004.


Word Tutor: polyglot
Top
pronunciation

IN BRIEF: Speaking or knowing several languages; multilingual.

pronunciation The ambassador was a polyglot and an expert on foreign affairs.

Wikipedia: Polyglot (computing)
Top

In the context of computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independently of the programming language used to compile or interpret it.

Generally polyglots are written in a combination of C (which allows redefinition of tokens with a preprocessor) and a scripting programming language such as Lisp, Perl or sh.

Techniques

The two most commonly used techniques for constructing a polyglot program are to make liberal use of languages which use different characters for comments and to redefine various tokens as others in different languages. Often good use is made of quirks of syntax. These are demonstrated in this public domain polyglot written in ANSI C, PHP and bash:

#define a /*
#<?php
echo "\010Hello, world!\n";// 2> /dev/null > /dev/null \ ;
// 2> /dev/null; x=a;
$x=5; // 2> /dev/null \ ;
if (($x))
// 2> /dev/null; then
return 0;
// 2> /dev/null; fi
#define e ?>
#define b */
#include <stdio.h>
#define main() int main(void)
#define printf printf(
#define true )
#define function
function main()
{
printf "Hello, world!\n"true/* 2> /dev/null | grep -v true*/;
return 0;
}
#define c /*
main
#*/

Note the following:

  • A hash sign marks a preprocessor statement in C, but is a comment in both bash and PHP.
  • "//" is a comment in both PHP and C and the root directory in bash.
  • Shell redirection is used to eliminate undesirable outputs.
  • Even on commented out lines, the "<?php" and "?>" PHP indicators still have effect.
  • The statement "function main()" is valid in both PHP and bash; C #defines are used to convert it into "int main()" at compile time.
  • Comment indicators can be combined to perform various operations.
  • "if (($x))" is a valid statement in both bash and PHP.
  • printf is a bash shell builtin which is identical to the C printf except for its omission of brackets (which the C preprocessor adds if this is compiled with a C compiler).
  • The final three lines are only used by bash, to call the main function. In PHP the main function is defined but not called and in C there is no need to explicitly call the main function.

The term is sometimes applied to programs that are valid in more than one language, but do not strictly perform the same function in each. One use for this form is a file that runs as a DOS batch file, then re-runs itself in Perl:

@echo off
perl "%~dpnx0" %*
goto endofperl
@rem ';
#!perl
print "Hello, world!\n";
 :endofperl

This allows the creation of Perl scripts that can be run on DOS systems with minimal effort.

External links


Translations: Polyglot
Top

Dansk (Danish)
adj. - mangesproget
n. - mangesproget person

Nederlands (Dutch)
meertalig, polyglottisch, iemand die veel talen spreekt, polyglot

Français (French)
adj. - polyglotte
n. - polyglotte

Deutsch (German)
n. - Polyglotte
adj. - mehrsprachig, polyglott

Ελληνική (Greek)
n., -
adj. - πολύγλωσσος

Italiano (Italian)
poliglotta

Português (Portuguese)
n., -
adj. - poliglota

Русский (Russian)
полиглот, многоязычие

Español (Spanish)
adj. - polígloto, políglota
n. - polígloto

Svenska (Swedish)
n. - polyglot, flerspråkig person
adj. - mångspråkig, skriven på (sammansatt av) flera språk

中文(简体)(Chinese (Simplified))
通晓数种语言的, 数种语言书写的, 精通数国语言的人, 数种文字的对照本

中文(繁體)(Chinese (Traditional))
adj. - 通曉數種語言的, 數種語言書寫的
n. - 精通數國語言的人, 數種文字的對照本

한국어 (Korean)
adj. - 수개 국어에 통하는, 수개 국어의
n. - 수개 국어에 통하는 사람, 수개 국어로 쓴 책

日本語 (Japanese)
adj. - 数か国語で書いた, 数か国語対訳の
n. - 数か国語に通じた人, 数か国語対訳書, 数か国語の混合

العربيه (Arabic)
‏(الاسم) من يتقن عدة لغات (صفه) كثير اللغات, متكلم او كاتب بعدة لغات‏

עברית (Hebrew)
adj. - ‮רב-לשוני, כתוב בהרבה שפות, של (אדם) השולט בשפות רבות‬
n. - ‮ספר הכתוב בשפות רבות, אדם הבקי בשפות רבות‬


 
 
Learn More
polyglottous
pentaglot
Polyglot Bible (in literature)

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Dictionary. The American Heritage® Dictionary of the English Language, Fourth Edition Copyright © 2007, 2000 by Houghton Mifflin Company. Updated in 2009. Published by Houghton Mifflin Company. All rights reserved.  Read more
Wordsmith Words. © 2009 Wordsmith.org. All rights reserved.  Read more
Word Tutor. Copyright © 2004-present by eSpindle Learning, a 501(c) nonprofit organization. All rights reserved.
eSpindle provides personalized spelling and vocabulary tutoring online; free trial Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Polyglot (computing)" Read more
Translations. Copyright © 2007, WizCom Technologies Ltd. All rights reserved.  Read more

 

Mentioned in