../wow-languages-solution

How World Of Warcraft made their languages work

I am always looking for elegant solutions to various programming problems. Today, let's look at one of the most iconic language barriers in gaming history: the communication divide between the Horde and the Alliance in World of Warcraft.

What is the language system in World of Warcraft?

In World of Warcraft, Blizzard implemented a system to prevent opposing factions from communicating with each other. This was primarily a game design decision meant to prevent griefing, trash talk, and toxic behavior during player-versus-player (PvP) combat.

When players communicate using a specific in-game language, the game's UI prepends the chat bubble with a language tag (like [Draenei]). While characters who share this language can read the text perfectly, players from other races or the opposing faction will only see a string of gibberish.

When an Alliance player types a message, any Horde player nearby sees only gibberish, and vice versa. However, this isn't just randomly generated text. The game engine uses a predefined dictionary of gibberish words categorized by length for each specific in-game language (like Orcish or Common).


What are the requirements for this system?

To make this system feel immersive and natural without breaking the game's performance, the developers had to meet several specific constraints:


Solution

Rather than relying on real-time random number generation or clunky exception rules, Blizzard opted for a deterministic hashing algorithm.

Here is the step-by-step pipeline of how the engine processes a chat message:

  1. Word Segmentation: The engine reads the sentence and splits it into individual words, preserving punctuation.
  2. Length Evaluation: It counts the number of characters in the word and pulls up the target language's "gibberish array" for that specific length (e.g., all 3-letter Orcish words).
  3. The Hashing Function: The engine converts the underlying ASCII characters of the typed word into numerical values and runs them through a hashing formula to generate a single, fixed integer sum.
  4. Index Selection (Modulo Operation): The engine takes that hash integer and performs a modulo operation against the total number of words in the gibberish array. This dictates the exact index slot the word points to.
  5. Case Formatting: The engine checks the casing of the original input. If the original word was capitalized (like "Lol"), the engine capitalizes the first letter of the retrieved gibberish word ("Kek").
  6. Output: The original word is replaced by the formatted gibberish word and broadcast to the opposing faction.

The "Kek" Easter Egg

The most famous example of this system is the Orcish translation of "lol", which appears as "kek" to Alliance players. "Kek" was an inside joke at Blizzard, referencing how Korean StarCraft players typed laughter ("ㅋㅋㅋ" showing up as "kekeke" in English clients).

Many players assumed if (word == "lol") return "kek" was hardcoded into the game. In reality, the developers simply calculated the math backwards. They ran "lol" through their hashing algorithm, found out exactly which index slot it would point to in the 3-letter array, and intentionally placed the word "kek" into that slot.

Because the system relies strictly on mathematics, any other word that produces the same hash sum (like "one" or "elf") will also perfectly translate into "kek".

Interestingly, this translation is completely asymmetrical. The mathematical hash for the Alliance's Common language dictionary is different. If an Alliance player types "lol", a Horde player will see it translated as "bur".


Vulnerabilities: Breaking the Barrier

Because the algorithm is entirely deterministic and relies heavily on word length, it introduced a vulnerability that dedicated players quickly reverse-engineered.

Since a specific character string always produces the same translation, players figured out they could bypass the language barrier by breaking English words into smaller chunks using spaces. By forcing the engine to use the 1-letter and 2-letter dictionary arrays, players could string together specific gibberish outputs to spell readable words for the other faction.

For example, if an Alliance player memorized the Common-to-Orcish dictionary, they could type a nonsensical spaced-out string like me e vil. The engine would translate those specific 2-letter, 1-letter, and 3-letter words into a sequence that spelled out a perfectly readable English message on the Horde player's screen.

It is a beautiful example of using simple math to build an immersive, consistent, and highly performant game mechanic—and an equally beautiful example of players finding a way to outsmart it.

/programming/ /games/ /algorithms/ /system-design/ /game-design/