I'd had the idea of a blog post about the use of languages in D&D in the back of my mind lately, and seeing a post on that topic on Goblin Punch this morning was motivation enough to actually go through with it. As evidenced in my previous TTRPG post, I like having language diversity as part of the game. It reflects much of the source material that I like, whether acting as a barrier to specialized knowledge (as Lovecraft's and Smith's common use of sorcerous foreign tomes), differentiating worldly travellers from everyday rabble (as Howard demonstrated via Conan's Omniglot nature), or serving as an expression and/or launching point for cultural divisions (as in Tolkien's works).
I agree with Arnold K's stance that language implementation can lead to problems, but I'd argue that those problems arise from two root causes: isolating matters of language from other elements of the fictional world and forcing decision points on players which they are effectively incapable of gathering information for.
Let me start with the real world. We have many languages. I think most countries with a public education system include study of at least two languages (a native language and another) in their curriculum. It's common for people to want to learn more languages and to talk about learning a new language as "expanding their horizons" or similar phrases about surpassing previous limitations. Once you get past the initial frustrations of having the communication capacity of a toddler, using a new language can be a very rewarding and empowering experience.
In other words, it's a way to level up in real life. However, unlike other "level up in real life" things like acquiring wealth, defeating opposition, accomplishing goals, or discovering new places, it's not simple to reward XP in D&D for learning languages, or more broadly, for gaining character knowledge/expertise. In fact, the opposite tends to be true; characters gain knowledge/expertise (via improving hit points, attack rolls, saving throws, and spell slots, if not also skills or other post-1974 mechanics) as a result of leveling up.
D&D isn't unique in this (e.g. Call of Cthulhu does a similarly thing in providing a chance to learn from skill successes as a result of completing a task without needing a direct, non-narrative connection between them), and I'm not saying it's a bad thing. My point is that the player-experienced reward for gaining a language isn't in actually gaining the language, it's in applying the language.
Thus, in order to make languages useful, there have to be opportunities for practical application in the fictional world. This can be done by simple pass/fail gates: certain tavern rumors are only available if the PCs know a specific language, dungeon signs written in a specific language, a MacGuffin to be delivered to someone who knows its esoteric language, etc. This can be done by allowing the language to improve their ability to communicate: granting a bonus to reaction rolls, allowing parlay to be engaged in at all, etc. This can be done any number of other ways that I'm not mentioning here. For the language to feel like more than just a note on a character sheet, applications for the language have to exist, much like how classic thief skills are useless without any locks to pick, traps to disarm, walls to climb, and so forth.
That's all fine in theory, but how does it play out at the table? Here's where I address the two root causes of problems that I'd mentioned before:
1. Integrate languages into the fictional world without disrupting play
The fictional world is populated by fictional people. These fictional people use languages, much like in the real world. Think of how people use languages in the real world, and apply that logic to analogous situations in the fictional world.
However, it's important keep in mind that you're playing a game with (likely) multiple other people, so this should be done in a way that everyone can enjoy if not participate in. For instance, once it's established that a PC has a common language with an NPC, there's no need to play out that PC acting as translator for the rest unless it becomes important (e.g. the player wants their PC will mistranslate something on purpose or the NPC asks the PC to bullshit translation while they scheme).
Honestly, this sounds fancier than it really is. The key is to have some idea of how having multiple languages would've influenced the world. It needn't be planned in advance; improvise it in the same way you would if a player asked about any other cultural elements (e.g. naming conventions, dietary staples, clothing conventions, superstitions, etc.). Putting more thought into it can help bring it to life, of course, but like with most worldbuilding exercises, there's typically nothing wrong with leaving it aside until it becomes relevant in play.
The question that usually comes up with this is whether essential information should be locked behind language barriers. I see language barriers as being no different from a puzzle that's impossible if you don't know the solution and trivial if you do. For one-shot or adventure-of-the-week styles of play, I'd advise against requiring players to overcome them in order to succeed because the time-limited nature of those formats means that players don't tend to have much choice in the matter. For a long-running campaign, on the other hand, I'd say it's perfectly fine. It lets the players make a choice between pressing on without that information or letting things be until they can decipher it.
2. Provide opportunities for players to to gather information to make informed choices about languages
If languages come up as part of character creation, give your players a list of language options, and give them some description of why they (as a player) might want to pick each. It's critical here to talk to the player; if they want to consider things from their PC's perspective, that should come up naturally. Telling them "orcs speak Orc, and dragons speak Dragon" is worthless. Telling them "orcs, who're often enslaved by evil masters, speak Orc, and dragons are too haughty to deal with anyone who doesn't speak Dragon" is meaningful, because now the player gets to pick between knowing a language which could have broad use against a common adversary versus a language which can enable them to negotiate with certain powerful entities. It might sound like I've described how the languages fit into the world, and there is a touch of that in that, but the conclusions that the descriptions led to were entirely about how that language would affect the player's experience, not the character's.
If the players are planning to do something where their characters would reasonably expect to encounter foreign languages, let them know about that before their PCs actually begin going through with those plans. It's something that would be obvious to the PCs, and failing to consider it during the planning is usually a fault in players relying on the GM to give a view into the fictional world.
If the PCs want to learn foreign languages, that's a topic beyond the scope of this post, but my quick advice is to be open about how long that'd take and what sort of resources would be required. I've tried both having languages learned like any other specialized skills and having languages learned spontaneously/retroactively as in Lamentations of the Flame Princess. Either one can work, and which one works better depends on the balance of how important languages are in your game and how much opportunity cost there is to learning them. Experiment, tinker, and don't be afraid to talk with your players about changing the approach if it's not working how in a satisfying way.