The history of Flag signalling dates back thousands of years, when it was primarily used in military situations. For example, the Roman navy used red flags or cloaks as signals between vessels. Early use of flag signalling was however primitive and inconsistent.
It was not until the early 18th century, that navies began to standardize the messages. A number of signal codes were used.
Marryat's Code, published in 1817, was the first general system of signalling for use by merchant vessels and the most widely used system prior to 1857.
By the mid 19th century, in 1855, the first International Code of Signals, the Commercial Maritime Code, was drafted and then published in 1857, by the British Board of Trade in an effort to define a standard form of communication between vessels at sea and shore.
This original form of the code, still in use today, included 18 signal flags that could convey up to approximately 1,000 messages.
The code was subsequently modified in 1932 when six flags were added to accommodate different languages, and again in 1969 when more flags were added to accommodate Russian and Greek and the range of messages was reduced to focus on navigaion and safety.
Today the code, known as the International Code of Signals (ICS), is made up of 40 flags.
Naval ships generally do not use the ICS to communicate but rather their own navy's, or group's (e.g. NATO) code using the same set of flags. The first flag hoisted (a designator flag) indicates whether the signal should be interpreted as an ICS or naval signal.
One of the most interesting aspects of the ICS is that all of the standardized messages are the same for nine languages including English, French, Italian, German, Japanese, Spanish, Norwegian, Russian and Greek.
It is unimportant that the sender and receiver speak different languages as each is using a book in their own language which keys equivalent messages to the same code.