I know that English is the most popular language to write scientific/mathematical papers after World War 2. I also know that in the second half of 19th century and first half of 20th century, German and French were the main languages to write mathematical (scientific) papers. Before 19th century however, it seems that Latin was the main languages in which most scientific/mathematical papers were written. My question is, what was the main language in which scientific/mathematical papers were written before 1850? I know Newton's Principia Mathematica was in Latin. What were languages used by most 18th to 19th centuries mathematicians like Euler, Gauss, Lagrange, Laplace and etc?
For what it’s worth, here are the languages of the 1645 math/phys paper and book titles from the years 1690–1919 in a bibtex file I have. Of course unscientific with all kinds of biases, but I imagine the catalogues of Reuss (1808), the Royal Society (1800–1883) and Jahrbuch (1868–1942) might give a similar plot.
Added (from the same file; graph is smoother as a journal appears in every decade it was active, regardless of whether it is represented in that decade):
Titles of math / physics / celestial mechanics journals represented before 1850:
1665 Le Journal des sçavans (Paris) 1947
1665 Philosophical Transactions of the Royal Society (London) >
1822 Memoirs of the (Royal) Astronomical Society 1978
1827 Monthly notices of the (Royal) Astronomical Society >
1832 Proceedings of the Royal Society >
1679 Connaissance des temps (Paris) >
1682 (Nova) Acta Eruditorum (Leipzig) 1782
1692 Memoires de mathematique et de physique de l’Académie des Sciences (Paris) 1693
1698 Regiae Scientiarum Academiae Historia 1698
1705 Histoire de l’Academie des Sciences, avec les Memoires 1788
1721 Recueil des pièces qui ont remporté le prix de l’Académie des Sciences 1777
1729 Memoires de l’Académie des Sciences depuis 1666 jusqu’à 1699 1734
1750 Mémoires présentés à l’Académie des Sciences par divers Sçavans 1786
1798 Mémoires de l’Institut 1864
1805 Mémoires présentés à l’Institut par divers Savans 1914
1835 Comptes rendus de l’Académie des Sciences >
1710 Miscellanea Berolinensia (Berlin) 1744
1746 Histoire de l’Académie des Sciences et des Belles-Lettres 1771
1772 (Nouveaux) Mémoires de l’Académie des Sciences et Belles-Lettres 1807
1774 Astronomisches Jahrbuch 1959
1815 Abhandlungen der Preußischen Akademie der Wissenschaften 1919
1836 Berichte der Preußischen Akademie der Wissenschaften 1938
1710 Giornale de’ letterati d'Italia (Venezia) 1740
1728 (Novi) Commentarii Academiae Scientiarum (St Petersburg) 1776
1778 (Nova) Acta Academiae Scientiarum 1806
1809 Mémoires de l'Académie des Sciences 1897
1831 Mémoires présentés à l'Académie des Sciences par divers Savans 1859
1835 Bulletin de l'Académie des Sciences 1894
1739 Göttingische Gelehrte Anzeigen (Göttingen) >
1752 Commentarii Societatis Scientiarum (Göttingen) 1841
1843 Abhandlungen der Gesellschaft der Wissenschaften >
1845 Nachrichten der Gesellschaft der Wissenschaften >
1759 Miscellanea Philosophico-Mathematica Societatis Privatae (Torino) 1759
1762 Mélanges de Philosophie et de Mathématique de la Société Royale 1776
1786 Mémoires de l’Académie des Sciences 1801
1818 Memorie della Accademia delle scienze >
1777 (Nouveaux) Mémoires de l’Académie des Sciences et Belles-Lettres (Bruxelles) >
1782 Memorie di matematica e di fisica della Società italiana (Modena) >
1786 Magazin für reine und angewandte Mathematik (Leipzig) 1788
1794 Archiv der reinen und angewandten Mathematik 1800
1787 Transactions of the Royal Irish Academy (Dublin) 1907
1841 Proceedings of the Royal Irish Academy >
1789 Annales de chimie (Paris) 1815
1816 Annales de chimie et de physique 2009
1790 (Neues) Journal der Physik (Leipzig) 1797
1799 Annalen der Physik >
1791 (Nouveau) Bulletin des sciences, par la société philomathique (Paris) 1833
1794 Journal de l’École polytechnique (Paris) 1938
1798 Philosophical magazine (London) >
1807 Mémoires de physique et de chimie, de la Société d'Arcueil (Paris) 1817
1810 Annales de mathématiques pures et appliquées (Nîmes) 1832
1836 Journal de mathématiques pures et appliquées (Paris) >
1814 Effemeridi astronomiche (Milano) 1873
1818 Correspondance astronomique, géographique, hydrographique et statistique (Genova) 1826
1821 Astronomische Nachrichten (Altona) >
1822 Transactions of the Cambridge Philosophical Society (Cambridge) 1928
1824 Bulletin des sciences mathématiques, astronomiques, physiques et chimiques (Paris)1831
1825 Correspondance mathématique et physique (Gand) 1839
1826 Journal für die reine und angewandte Mathematik (Berlin) >
1833 Reports of Meetings of the British Association (London) 1938
1839 The Cambridge (and Dublin) mathematical journal (Cambridge) >
1841 Archiv der Mathematik und Physik (Leipzig) 1920
1842 Nouvelles annales de mathématiques (Paris) 1927
1847 Atti della Accademia dei Lincei (Roma) >
1848 Sitzungsberichte der Akademie der Wissenschaften (Wien) >
While I hesitate to draw conclusions from these graphs, they match other answers’ idea that there was never one main language before WWII — more like four by 1850. Publication by foreigners has a longer tradition in French (Huygens, Leibniz, Bernoulli, Euler, Bessel, Jacobi, Dirichlet, etc.) than in other languages (more like late 19th century), but for a long time international dissemination remained rather via translations: e.g. in Annalen der Physik (Young, Biot, Ampère, Fresnel, Sturm), Liouville’s and other journals in French (Hamilton, Jacobi, MacCullagh, Neumann, Gauss, Kummer, Christoffel, Plücker, Beltrami, Kirchhoff, Klein), Philosophical Magazine and others in English (Foucault, Duhamel, Plücker, Clausius, Lipschitz, Hermite, Helmholtz, Klein), etc.
Sommerville’s Bibliography of non-Euclidean geometry also has some statistics (1911, p. viii).
Habits and fashions among authors and publishers for choosing languages in which to communicate science and mathematics evolved in a complex as well as an interesting way.
I could not pretend to give an exhaustive answer to the question, but I offer examples below of different linguistic tendencies at work in about the period 1700 to 1850. The examples given by the memoirs of the academies of science in Berlin, and also in St Petersburg, show that during the 18th century the French language attained an international usage that seems to have been little noticed in previous related questions and the answers to them, which have had focus more on the use of German.
This early prominence of French also seems confirmed by the interesting chart that Francois Ziegler's answer has added to the discussion, with his chart showing the language makeup of his database of math/physics papers from about 1690. In summary, for that database of papers, the 18th-century growth of the literature appears to have been largely in French, then the 19th-century growth more in German and English.
Turning now to the more detailed examples, The present question suggested that before the 19th century it seemed "that Latin was the main language in which most scientific/mathematical papers were written".
There are signs that the well-known traditional dominance of Latin was beginning to break down in certain respects already in the 17th century. For example, in England the 'Philosophical Transactions' appeared mainly in English, though they used Latin for many purely mathematical contributions and also for some communications received or copied from authors outside England. English authors who wrote both on mathematics and on other scientific subjects, e.g. Edmond Halley, can be read in Latin for their mathematical demonstrations, and in English for their other scientific contributions in that journal. In France, the 'Histoire de l'Académie royale des sciences ... avec les mémoires' from mid-17th-century onwards appeared entirely or almost entirely in French.
Scientific and mathematical books still appeared mainly in Latin, sometimes at considerable effort of translation, e.g. in the case of John Wallis' 1672-3 edition of works and letters of the astronomer Jeremiah Horrocks: this was translated by Wallis into Latin expressly for the sake of the international audience, where (some of) the original papers had been in English.
So far, the influences seen through these examples include the wish of authors and editors to be internationally understood, and the habits and preferences of journal-publishers.
From the early 18th century onwards it seems there was an increasing tendency towards use of the vernacular at least in in England and France. Books originally in Latin were translated into English and French, and some appeared first in their respective vernacular, for example Newton's 'Opticks' appeared first in English in 1704, though a translated and revised Latin edition followed soon after.
One remarkable apparent exception, for a time, to the tendency to use the vernacular was the publications of the Berlin royal academy of sciences, which appeared mainly or wholly in French and not German, from 1745 to 1804, first as Histoire de l'Académie Royale des Sciences et des Belles-Lettres de Berlin, then as Nouveaux Mémoires de l'Académie Royale des Sciences et Belles-Lettres, and finally as Mémoires de l'Académie Royale des Sciences et Belles-Lettres. On the other hand this use of French outside of France for the Berlin memoirs was perhaps not such an exception, one can also see a mixed use of French alongside the traditional Latin in the memoirs of the 18th-century Petersburg Imperial academy of sciences.
Very possibly the Napoleonic/European wars reinforced a tendency to use the vernacular, but it now seems remarkable that there were some signs of slowness to include German among the internationally-current languages of science. Thus for example Gauss' work of great importance 'Theoria motus corporum coelestium...' (1809) had been written first in German, according to the biography of Gauss by G W Dunnington et al. (2004) p.90, but on request from the publisher, F C Perthes, it was translated and published in Latin.
About the authors specifically named in the question:-- there are many papers of Euler in the Berlin memoirs in French, while elsewhere Euler wrote in Latin or (seemingly less often) German. Euler's work dated from long before the Napoleonic wars and their related conflicts. Lagrange and Laplace wrote in French, and I'm not aware of anything from them that first appeared in any other language. (Lagrange was born and educated in Turin before moving to Paris, and published early works there: what I have seen appeared in French but perhaps there were also items in Italian.) Gauss, who was personally much affected by Napoleonic-war conditions, is said to have refused to publish in French; his works appeared in Latin, otherwise in German.
Other answers, to this and other questions, have described the growth of German-language publications in science and mathematics once German became established -- and the examples of widespread use of French, and now also Francois Ziegler's chart, suggest this hardly happened before the 19th century. The later growth in international use of English is outside the scope of this particular question.
Since the end of 18 century, perhaps even earlier, most papers were probably published in German. And it kept this leading position until 1930s. I am not so sure about other sciences, but this was so in mathematics. Once I counted the PhD listed in the Math Genealogy project, by countries. Since the 18th century, the largest number (by far) came from German-speaking countries.
So it was "main" in terms of statistics. But certainly, English mathematicians wrote in English, French wrote in French, Italians wrote in Italian, and many (in all countries) wrote in Latin. So German was not "dominating" in the same sense as English is now. But in terms of numbers, one can safely state that the largest number of mathematical publications were in German, and the largest number of mathematicians lived in German-speaking countries.
EDIT. For example, here is the 18th century distribution in Math Genealogy: Germany 317, Netherlands 122, England 24, France 14, Switzerland 8, Austria 7, Poland 1. Looks strange, of course. And I am not sure how to interpret this.
As mentioned by others, lots was written in german during the 1700-1800s. All the german mathematicians wrote to each other in german. And lots of people in East-Prussia (big parts of now Poland), Habsburg and later Austro-Hungarian empire was super huge and many of people living there wrote in german even though it was not their mother tongue. It is quite impressive how they managed to learn it so well given how different germanic and slavonic languages are.
Lots of mathematics was in fact written in communication between mathematicians by letter during this time. Probably much more than was ever published.
Another question is which language had the most journals and/or number of articles published in such journals.
I guess the answer you seek could depend on if you mean total amount written or in which form it was published, as letters or in journals or standalone books or some other form.
This article is interesting, because the argument regarding how German faded out in way of English becoming the current "language of science" is also applicable to how Latin was replaced by German as the "language of science."
French, German, Italian, and English are all latin based languages. So, as you say, Latin was the main language used prior to the 19th century, and the scientists/mathematicians of the 18th and 19th centuries began using their own local languages (which all branched from Latin) since this time period was a transition away from Latin. Naturally, this means that Laplace wrote in French, Gauss in German, Lagrange in Italian and French, etc... But keep in mind that such intellectuals were very likely to be literate in multiple languages, i.e. Euler wrote in French, German and Latin.