Languages are an important consideration in international data management. A person's language is often of great imporatance to an individual, as the many tensions between language groups on various parts of the planet attest.
Depending on how languages are defined and counted, there are between 5000 and 10000 languages spoken on the planet, many of which do not have a written form. The value a person places on the correct language being used differs, from countries where a lingua franca may acceptably be used, to those where any errors will cause immediate animosity.
Languages are spoken by people, not by countries, and every country has speakers from more than one language group, both indigenous and foreign. Defaulting to languages of a region rather than a person is bad practice and needs refinement.
Never assume that everybody in any country speaks (one of) the national language(s) of that country. Many countries have speakers of indigenous languages which are not national languages, and most have significant minorities (or, in some cases, majorities) of non-nationals speaking languages other than the offical one(s).
Note the preferred language of a person in a database, even if you are not able (at the current time) to communicate with them in that language.
Use the local form of the language. Thus, use the Flemish form for Dutch-speakers in Belgium rather than the Northern Dutch version; use Swiss-German in Switzerland, Québecois in Canada instead of Metropolitan French, and so on.
Use the language of the person, not the language of the place that person is in.
Do not use a flag to indicate a language on customer-facing pages/forms. One language, such as Spanish or English, is spoken in many countries, so one flag cannot cover them all. Equally, in many countries multiple languages are spoken, so customers clicking on a Swiss flag, for example, won't know which of the country's four official languages they will get. There are also geopolitical issues. Companies that offer websites for China and Taiwan have found the Taiwanese flag can be offensive to Chinese nationals who feel that Taiwan is not a country in its own right.
This site used flags from one nation to indicate languages, though all these languages are spoken in many more countries
Addresses are not always written in (one of) the language(s) of a country.
Example: The area known as Cité Pasteur, in the heart of Berlin, Germany, has streets named in French
Examples
This "Ode to a Shipping Label" beautifully illustrates the issues involved in handling different languages on computers. (Originally found on Facebook here )
ODE TO A SHIPPING LABEL
Once there was a little o, with an accent on top like só.
It started out as UTF8, (universal since '98), but the program only knew latin1, and changed little ó to "ó" for fun.
A second program saw the "ó" and said "I know HTML entity!" So "ó" was smartened to "ó" and passed on through happily.
Another program saw the tangle (more precisely, ampersands to mangle) and thus the humble "ó" became "ó"