{"id":55,"date":"2026-07-27T15:27:15","date_gmt":"2026-07-27T15:27:15","guid":{"rendered":"https:\/\/interaction-bot.com\/blog\/discord-server-language-diversity-analyzer\/"},"modified":"2026-07-27T15:27:15","modified_gmt":"2026-07-27T15:27:15","slug":"discord-server-language-diversity-analyzer","status":"publish","type":"page","link":"https:\/\/interaction-bot.com\/blog\/discord-server-language-diversity-analyzer\/","title":{"rendered":"Discord Server Language Diversity Analyzer"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html lang=\"en\"><br \/>\n<head><br \/>\n<meta charset=\"UTF-8\"><br \/>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><br \/>\n<title>Discord Server Language Diversity Analyzer \u2014 interaction-bot.com<\/title><\/p>\n<style>\n*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }<\/p>\n<p>body {\n  font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n  line-height: 1.6;\n  color: #1a1a2e;\n  background: #f8f9fc;\n}<\/p>\n<p>.tool-section {\n  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);\n  padding: 48px 20px 56px;\n  color: #fff;\n}<\/p>\n<p>.tool-section h1 {\n  font-size: clamp(1.5rem, 4vw, 2.2rem);\n  text-align: center;\n  margin-bottom: 8px;\n  font-weight: 700;\n  letter-spacing: -0.02em;\n}<\/p>\n<p>.tool-section .subtitle {\n  text-align: center;\n  opacity: 0.85;\n  font-size: 1.05rem;\n  margin-bottom: 36px;\n}<\/p>\n<p>.tool-card {\n  max-width: 900px;\n  margin: 0 auto;\n  background: #fff;\n  border-radius: 16px;\n  padding: 32px;\n  color: #1a1a2e;\n  box-shadow: 0 8px 32px rgba(0,0,0,0.12);\n}<\/p>\n<p>.input-area {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  margin-bottom: 24px;\n}<\/p>\n<p>.presets {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 8px;\n}<\/p>\n<p>.preset-btn {\n  background: #eef0ff;\n  border: 1px solid #d0d5f7;\n  border-radius: 20px;\n  padding: 6px 14px;\n  font-size: 0.85rem;\n  cursor: pointer;\n  color: #4752c4;\n  transition: all 0.15s;\n}<\/p>\n<p>.preset-btn:hover, .preset-btn:focus {\n  background: #d0d5f7;\n  border-color: #5865f2;\n}<\/p>\n<p>.preset-btn:focus-visible {\n  outline: 2px solid #5865f2;\n  outline-offset: 2px;\n}<\/p>\n<p>.input-row {\n  display: flex;\n  gap: 12px;\n  flex-wrap: wrap;\n}<\/p>\n<p>.input-row textarea {\n  flex: 1;\n  min-width: 260px;\n  min-height: 72px;\n  padding: 12px 16px;\n  border: 2px solid #dde;\n  border-radius: 10px;\n  font-size: 0.95rem;\n  font-family: inherit;\n  resize: vertical;\n  transition: border-color 0.2s;\n}<\/p>\n<p>.input-row textarea:focus {\n  outline: none;\n  border-color: #5865f2;\n  box-shadow: 0 0 0 3px rgba(88,101,242,0.12);\n}<\/p>\n<p>.analyze-btn {\n  padding: 12px 28px;\n  background: #5865f2;\n  color: #fff;\n  border: none;\n  border-radius: 10px;\n  font-size: 1rem;\n  font-weight: 600;\n  cursor: pointer;\n  white-space: nowrap;\n  transition: background 0.2s, transform 0.1s;\n}<\/p>\n<p>.analyze-btn:hover { background: #4752c4; }\n.analyze-btn:active { transform: scale(0.98); }\n.analyze-btn:focus-visible {\n  outline: 2px solid #5865f2;\n  outline-offset: 2px;\n}<\/p>\n<p>.error-msg {\n  color: #d32f2f;\n  font-size: 0.9rem;\n  min-height: 20px;\n  margin-bottom: 8px;\n}<\/p>\n<p>.results {\n  display: none;\n}<\/p>\n<p>.results.active {\n  display: block;\n}<\/p>\n<p>.results-grid {\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  gap: 24px;\n  margin-bottom: 28px;\n}<\/p>\n<p>.chart-container {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n}<\/p>\n<p>.chart-container canvas {\n  max-width: 280px;\n  width: 100%;\n  height: auto;\n}<\/p>\n<p>.metrics {\n  display: flex;\n  flex-direction: column;\n  gap: 14px;\n  justify-content: center;\n}<\/p>\n<p>.metric {\n  background: #f8f9fc;\n  border-radius: 10px;\n  padding: 14px 16px;\n  border-left: 4px solid #5865f2;\n}<\/p>\n<p>.metric-label {\n  font-size: 0.8rem;\n  text-transform: uppercase;\n  letter-spacing: 0.06em;\n  color: #6b7280;\n  font-weight: 600;\n}<\/p>\n<p>.metric-value {\n  font-size: 1.6rem;\n  font-weight: 700;\n  color: #1a1a2e;\n}<\/p>\n<p>.metric-context {\n  font-size: 0.8rem;\n  color: #6b7280;\n  margin-top: 2px;\n}<\/p>\n<p>.score-bar-bg {\n  width: 100%;\n  height: 8px;\n  background: #e5e7eb;\n  border-radius: 4px;\n  margin-top: 6px;\n}<\/p>\n<p>.score-bar-fill {\n  height: 100%;\n  border-radius: 4px;\n  transition: width 0.5s ease, background 0.5s ease;\n}<\/p>\n<p>.recommendation {\n  background: #f0fdf4;\n  border: 1px solid #bbf7d0;\n  border-radius: 12px;\n  padding: 20px 24px;\n  margin-bottom: 8px;\n}<\/p>\n<p>.recommendation h3 {\n  font-size: 1.05rem;\n  margin-bottom: 10px;\n  color: #166534;\n}<\/p>\n<p>.feature-list {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 10px;\n}<\/p>\n<p>.feature-tag {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 8px 14px;\n  border-radius: 8px;\n  font-size: 0.9rem;\n  font-weight: 600;\n}<\/p>\n<p>.feature-tag.recommended {\n  background: #dcfce7;\n  color: #166534;\n  border: 1px solid #86efac;\n}<\/p>\n<p>.feature-tag.optional {\n  background: #f8f9fc;\n  color: #6b7280;\n  border: 1px solid #e5e7eb;\n}<\/p>\n<p>.feature-desc {\n  margin-top: 12px;\n  font-size: 0.9rem;\n  color: #374151;\n  line-height: 1.5;\n}<\/p>\n<p>.explainer {\n  max-width: 780px;\n  margin: 0 auto;\n  padding: 48px 20px 64px;\n}<\/p>\n<p>.explainer h2 {\n  font-size: 1.5rem;\n  margin: 36px 0 14px;\n  color: #1a1a2e;\n}<\/p>\n<p>.explainer h2:first-child {\n  margin-top: 0;\n}<\/p>\n<p>.explainer p, .explainer li {\n  color: #374151;\n  font-size: 0.98rem;\n  line-height: 1.7;\n  margin-bottom: 12px;\n}<\/p>\n<p>.explainer ul, .explainer ol {\n  margin-left: 20px;\n  margin-bottom: 16px;\n}<\/p>\n<p>.explainer img {\n  max-width: 100%;\n  border-radius: 10px;\n  margin: 16px 0;\n}<\/p>\n<p>.explainer .caption {\n  font-size: 0.8rem;\n  color: #6b7280;\n  text-align: center;\n  margin-top: -10px;\n  margin-bottom: 20px;\n  font-style: italic;\n}<\/p>\n<p>.explainer iframe {\n  width: 100%;\n  max-width: 560px;\n  aspect-ratio: 16\/9;\n  border: none;\n  border-radius: 10px;\n  margin: 16px auto;\n  display: block;\n}<\/p>\n<p>.cta-box {\n  background: #eef0ff;\n  border: 1px solid #d0d5f7;\n  border-radius: 12px;\n  padding: 24px;\n  margin-top: 36px;\n  text-align: center;\n}<\/p>\n<p>.cta-box p {\n  margin-bottom: 12px;\n}<\/p>\n<p>.cta-box a {\n  color: #4752c4;\n  font-weight: 600;\n}<\/p>\n<p>.language-tag {\n  display: inline-block;\n  padding: 2px 8px;\n  background: #eef0ff;\n  border-radius: 4px;\n  font-size: 0.82rem;\n  font-weight: 500;\n  color: #4752c4;\n  margin: 0 2px;\n}<\/p>\n<p>@media (max-width: 640px) {\n  .tool-card { padding: 20px; }\n  .results-grid { grid-template-columns: 1fr; }\n  .chart-container { order: -1; }\n  .chart-container canvas { max-width: 220px; }\n  .input-row { flex-direction: column; }\n  .input-row textarea { min-width: 100%; }\n}\n<\/style>\n<p><\/head><br \/>\n<body><\/p>\n<section class=\"tool-section\">\n<h1>Discord Server Language Diversity Analyzer<\/h1>\n<p class=\"subtitle\">Paste your server&#8217;s language breakdown and see what translation features you need.<\/p>\n<div class=\"tool-card\" role=\"main\" aria-label=\"Language diversity analyzer\">\n<div class=\"input-area\">\n<div class=\"presets\" role=\"group\" aria-label=\"Preset language distributions\">\n        <button class=\"preset-btn\" type=\"button\" data-preset=\"gaming\">\ud83c\udfae Global Gaming Server<\/button><br \/>\n        <button class=\"preset-btn\" type=\"button\" data-preset=\"european\">\ud83c\uddea\ud83c\uddfa European Community<\/button><br \/>\n        <button class=\"preset-btn\" type=\"button\" data-preset=\"bilingual\">\ud83c\udf10 Bilingual Server<\/button><br \/>\n        <button class=\"preset-btn\" type=\"button\" data-preset=\"high\">\ud83c\udf0d Highly Diverse<\/button>\n      <\/div>\n<div class=\"input-row\">\n        <textarea id=\"langInput\" placeholder=\"English 60%, Spanish 25%, French 10%, Japanese 5%\" aria-label=\"Language distribution input\"><\/textarea><br \/>\n        <button class=\"analyze-btn\" type=\"button\" id=\"analyzeBtn\">Analyze<\/button>\n      <\/div>\n<\/p><\/div>\n<div class=\"error-msg\" id=\"errorMsg\" role=\"alert\"><\/div>\n<div class=\"results\" id=\"results\">\n<div class=\"results-grid\">\n<div class=\"chart-container\">\n          <canvas id=\"pieChart\" width=\"280\" height=\"280\" aria-label=\"Language distribution pie chart\" role=\"img\"><\/canvas>\n        <\/div>\n<div class=\"metrics\">\n<div class=\"metric\">\n<div class=\"metric-label\">Unique Languages<\/div>\n<div class=\"metric-value\" id=\"uniqueLang\">0<\/div>\n<\/p><\/div>\n<div class=\"metric\">\n<div class=\"metric-label\">Diversity Score<\/div>\n<div class=\"metric-value\" id=\"diversityScore\">0<\/div>\n<div class=\"score-bar-bg\">\n<div class=\"score-bar-fill\" id=\"diversityBar\"><\/div>\n<\/div>\n<div class=\"metric-context\">0 = everyone speaks the same language, 100 = every language equally represented<\/div>\n<\/p><\/div>\n<div class=\"metric\">\n<div class=\"metric-label\">Messages Benefiting from Auto-Translation<\/div>\n<div class=\"metric-value\" id=\"translationPct\">0%<\/div>\n<div class=\"metric-context\" id=\"translationContext\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"recommendation\" id=\"recommendation\">\n<h3>\ud83d\udd27 Recommended Interaction Bot Features<\/h3>\n<div class=\"feature-list\" id=\"featureTags\"><\/div>\n<div class=\"feature-desc\" id=\"featureDesc\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/section>\n<section class=\"explainer\">\n<h2>How this analyzer works<\/h2>\n<p>\n    If you run a Discord server with members from more than one language background, you have probably wondered whether you need a translation bot, and which features are worth setting up. This tool turns your rough sense of your server&#8217;s makeup into concrete numbers that match Interaction Bot&#8217;s feature set.\n  <\/p>\n<p>\n    Paste a list of languages and their approximate percentages. The tool accepts free-form input: <span class=\"language-tag\">English 60%, Spanish 25%, French 10%, Japanese 5%<\/span> or <span class=\"language-tag\">EN 60, ES 25, FR 10, JP 5<\/span> both work. You do not need exact numbers. A rough estimate from your server&#8217;s introduction channel or a quick poll is enough to get useful guidance.\n  <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/5\/5e\/Languages_by_total_number_of_speakers_highest_estimate.jpg\" alt=\"Chart showing the world's most spoken languages by total number of speakers, illustrating the kind of distribution patterns a multilingual server might reflect.\" loading=\"lazy\"><\/p>\n<p class=\"caption\">The world&#8217;s most spoken languages by estimated total speakers. A multilingual Discord server often mirrors this kind of distribution, with one or two languages dominating and a long tail of smaller language groups. Credit: Wikimedia Commons, <a href=\"https:\/\/commons.wikimedia.org\/wiki\/File:Languages_by_total_number_of_speakers_highest_estimate.jpg\">via Wikimedia<\/a>.<\/p>\n<h2>What the numbers mean<\/h2>\n<h3>Unique languages<\/h3>\n<p>\n    The count of distinct languages in your input. Servers with 2 languages need a different setup than servers with 12. Interaction Bot supports <strong>over 100 languages<\/strong> for automatic translation, so even a server with a long tail of languages is covered.\n  <\/p>\n<h3>Diversity score (0\u2013100)<\/h3>\n<p>\n    This uses the <strong>normalized Simpson Diversity Index<\/strong>, a standard measure borrowed from ecology and linguistics. It answers the question: if you pick two members at random, how likely are they to speak different languages?\n  <\/p>\n<p>\n    The raw Simpson index is <em>D = 1 \u2212 \u03a3(p\u1d62\u00b2)<\/em> where p\u1d62 is the proportion of speakers for each language. A server where everyone speaks one language scores D = 0. A server with five languages at 20% each scores D = 0.8. The tool normalizes this to a 0\u2013100 scale so the score reads intuitively: 0 means no diversity, 100 means maximum diversity for the number of languages present.\n  <\/p>\n<h3>Messages benefiting from auto-translation<\/h3>\n<p>\n    This is the <strong>Simpson index expressed as a percentage<\/strong>. It estimates what share of message-reader pairs cross a language boundary. In a server that is 60% English and 40% Spanish, about 48% of message-reader pairs involve different languages, meaning nearly half of all reading events would benefit from translation. This is not a measure of how many messages <em>get<\/em> translated, but how often translation would make communication possible where it otherwise would not be.\n  <\/p>\n<p>\n    The assumption here is that members send messages in proportion to their language group size and read messages across all languages. In practice, members self-segregate into language channels, but the index still gives a useful upper-bound estimate of the translation need.\n  <\/p>\n<p>  <iframe src=\"https:\/\/www.youtube.com\/embed\/rKs7eBYKyaY\" title=\"How to Setup Discord Translator Bot \u2014 Auto Translate Messages (2025 Tutorial) by UnityXpert\" loading=\"lazy\" allowfullscreen><\/iframe><\/p>\n<p class=\"caption\">UnityXpert&#8217;s walkthrough of setting up a Discord translator bot walks through the same configuration decisions this analyzer helps you make \u2014 which channels to translate, which languages to prioritize, and how to handle mixed-language communities.<\/p>\n<h2>Which Interaction Bot features match your server<\/h2>\n<p>\n    Interaction Bot offers three translation modes, and each fits a different kind of language profile:\n  <\/p>\n<ul>\n<li><strong>Flag Translation<\/strong> \u2014 Members react to any message with a flag emoji (\ud83c\uddea\ud83c\uddf8, \ud83c\uddeb\ud83c\uddf7, \ud83c\uddef\ud83c\uddf5) and the bot replies with a translation. Best for servers with one dominant language and occasional foreign-language messages. Low overhead, no channel setup required.<\/li>\n<li><strong>Channel Translation<\/strong> \u2014 Designate specific channels where every message is automatically translated into a target language (or multiple target languages). Best for servers with 2\u20134 significant language groups that each need their own space, or for a single <em>lingua franca<\/em> channel that auto-translates everything to English.<\/li>\n<li><strong>Role-Based Translation<\/strong> \u2014 Assign a language role to each member and the bot automatically translates messages to each reader&#8217;s preferred language in designated channels. Best for highly diverse servers where no single language dominates and members expect to read in their own language by default.<\/li>\n<\/ul>\n<p>\n    The recommendation the tool gives is not a rule. It is a starting point. A bilingual server might still benefit from role-based translation if the split is near 50\/50 and both groups are large. A highly diverse server with a strong <em>lingua franca<\/em> culture might get by with just flag translation. Use the recommendation as a hypothesis, then test it.\n  <\/p>\n<h2>Why language diversity matters for server growth<\/h2>\n<p>\n    Discord is a global platform. According to Discord&#8217;s own transparency reports, the platform serves users in over 150 countries, and popular public servers routinely draw members from dozens of language backgrounds. A server that only works for English speakers is leaving growth on the table.\n  <\/p>\n<p>\n    Setting up translation is not just about accessibility. It directly affects retention. A member who joins a server and cannot read the conversation leaves within minutes. A member who discovers the server speaks their language, even through machine translation, is far more likely to stay and participate.\n  <\/p>\n<p>\n    The analyzer above gives you a quick read on where your server stands. If the diversity score surprises you, that is the point. Many admins underestimate how multilingual their community already is.\n  <\/p>\n<div class=\"cta-box\">\n<p><strong>Ready to set up translation for your server?<\/strong><\/p>\n<p><a href=\"https:\/\/interaction-bot.com\/blog\/what-is-interaction-bot\/\">What Is Interaction Bot? The Complete Guide<\/a> covers every translation mode, how to configure them from the web dashboard, and what a working multilingual server looks like in practice.<\/p>\n<\/p><\/div>\n<\/section>\n<p><script>\n(function() {\n  'use strict';<\/p>\n<p>  const presets = {\n    gaming: 'English 40%, Spanish 20%, Portuguese 15%, French 10%, German 8%, Japanese 5%, Korean 2%',\n    european: 'English 35%, German 20%, French 18%, Spanish 12%, Italian 10%, Dutch 5%',\n    bilingual: 'English 70%, Spanish 30%',\n    high: 'English 25%, Spanish 18%, French 15%, German 12%, Japanese 10%, Portuguese 8%, Korean 7%, Arabic 5%'\n  };<\/p>\n<p>  const COLORS = [\n    '#5865f2', '#eb459e', '#faa61a', '#57f287', '#ed4245',\n    '#9b59b6', '#1abc9c', '#e67e22', '#3498db', '#2ecc71',\n    '#e74c3c', '#f1c40f', '#00bcd4', '#ff6f00', '#5c6bc0',\n    '#26a69a', '#ec407a', '#8d6e63', '#7e57c2', '#66bb6a'\n  ];<\/p>\n<p>  var textarea = document.getElementById('langInput');\n  var analyzeBtn = document.getElementById('analyzeBtn');\n  var errorMsg = document.getElementById('errorMsg');\n  var results = document.getElementById('results');\n  var canvas = document.getElementById('pieChart');\n  var ctx = canvas.getContext('2d');<\/p>\n<p>  document.querySelectorAll('.preset-btn').forEach(function(btn) {\n    btn.addEventListener('click', function() {\n      var key = btn.getAttribute('data-preset');\n      if (presets[key]) {\n        textarea.value = presets[key];\n        analyze();\n      }\n    });\n  });<\/p>\n<p>  analyzeBtn.addEventListener('click', analyze);\n  textarea.addEventListener('keydown', function(e) {\n    if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {\n      analyze();\n    }\n  });<\/p>\n<p>  function parseInput(raw) {\n    var parts = raw.split(\/[,;n]+\/).filter(function(s) { return s.trim(); });\n    var languages = [];<\/p>\n<p>    for (var i = 0; i < parts.length; i++) {\n      var part = parts[i].trim();\n      if (!part) continue;\n\n      var match = part.match(\/^(.+?)s+(d+.?d*)s*%?s*$\/);\n      if (!match) {\n        match = part.match(\/^(.+?):s*(d+.?d*)s*%?s*$\/);\n      }\n      if (!match) {\n        match = part.match(\/^(d+.?d*)s*%?s+(.+)$\/);\n        if (match) {\n          match = [part, match[2].trim(), match[1]];\n        }\n      }\n\n      if (!match) return null;\n\n      var name = match[1].trim();\n      var pct = parseFloat(match[2]);\n\n      name = name.charAt(0).toUpperCase() + name.slice(1).toLowerCase();\n\n      if (isNaN(pct) || pct <= 0) return null;\n      languages.push({ name: name, pct: pct });\n    }\n\n    if (languages.length === 0) return null;\n\n    var total = languages.reduce(function(sum, l) { return sum + l.pct; }, 0);\n    if (total === 0) return null;\n    languages.forEach(function(l) { l.pct = (l.pct \/ total) * 100; });\n\n    languages.sort(function(a, b) { return b.pct - a.pct; });\n\n    return languages;\n  }\n\n  function analyze() {\n    errorMsg.textContent = '';\n    var raw = textarea.value.trim();\n\n    if (!raw) {\n      errorMsg.textContent = 'Enter a language distribution, e.g. \"English 60%, Spanish 25%, French 15%\".';\n      results.classList.remove('active');\n      return;\n    }\n\n    var languages = parseInput(raw);\n\n    if (!languages) {\n      errorMsg.textContent = 'Could not parse input. Use the format \"Language percentage%\", e.g. \"English 60%, Spanish 40%\".';\n      results.classList.remove('active');\n      return;\n    }\n\n    if (languages.length === 1) {\n      errorMsg.textContent = '';\n    }\n\n    renderResults(languages);\n  }\n\n  function renderResults(languages) {\n    results.classList.add('active');\n\n    var n = languages.length;\n    var proportions = languages.map(function(l) { return l.pct \/ 100; });\n\n    var sumSq = proportions.reduce(function(s, p) { return s + p * p; }, 0);\n    var simpsonD = 1 - sumSq;\n\n    var maxD = (n > 1) ? (1 - 1\/n) : 1;\n    var normalizedScore = maxD > 0 ? Math.round((simpsonD \/ maxD) * 100) : 0;<\/p>\n<p>    var translationPct = Math.round(simpsonD * 100);<\/p>\n<p>    document.getElementById('uniqueLang').textContent = n;\n    document.getElementById('diversityScore').textContent = normalizedScore;<\/p>\n<p>    var bar = document.getElementById('diversityBar');\n    bar.style.width = normalizedScore + '%';\n    if (normalizedScore < 30) bar.style.background = '#57f287';\n    else if (normalizedScore < 60) bar.style.background = '#faa61a';\n    else bar.style.background = '#ed4245';\n\n    document.getElementById('translationPct').textContent = translationPct + '%';\n\n    var ctxEl = document.getElementById('translationContext');\n    if (translationPct < 20) {\n      ctxEl.textContent = 'Low need \u2014 most messages are already readable by most members.';\n    } else if (translationPct < 50) {\n      ctxEl.textContent = 'Moderate need \u2014 a significant share of conversations cross language lines.';\n    } else {\n      ctxEl.textContent = 'High need \u2014 most message pairs involve different languages. Auto-translation would transform readability.';\n    }\n\n    renderRecommendation(languages, simpsonD, n);\n    drawPieChart(languages);\n  }\n\n  function renderRecommendation(languages, simpsonD, n) {\n    var maxPct = languages[0].pct;\n    var tagContainer = document.getElementById('featureTags');\n    var descEl = document.getElementById('featureDesc');\n\n    var tags = [];\n    var desc = '';\n\n    tags.push({ name: '\ud83c\udff3\ufe0f Flag Translation', cls: 'recommended' });\n\n    if (n <= 2 &#038;&#038; maxPct >= 65) {\n      desc = 'Your server has a clear dominant language (' + languages[0].name + ' at ' + Math.round(maxPct) + '%). <strong>Flag translation alone<\/strong> will cover most situations. Members who encounter a message in another language can react with a flag emoji for an instant translation. Set up channel translation only if the minority language group is large and active enough to justify a dedicated channel.';\n      tags.push({ name: '\ud83d\udcfa Channel Translation', cls: 'optional' });\n      tags.push({ name: '\ud83c\udfad Role-Based Translation', cls: 'optional' });\n    } else if (n <= 4 &#038;&#038; maxPct >= 40) {\n      desc = 'Your server has ' + n + ' language groups with ' + languages[0].name + ' as the largest (' + Math.round(maxPct) + '%). <strong>Channel translation<\/strong> is the right primary setup: create dedicated channels for the top 2\u20133 languages, each auto-translating to the others. Keep <strong>flag translation<\/strong> enabled for one-off messages in smaller languages. Role-based translation is optional unless members regularly switch between channels.';\n      tags.push({ name: '\ud83d\udcfa Channel Translation', cls: 'recommended' });\n      tags.push({ name: '\ud83c\udfad Role-Based Translation', cls: 'optional' });\n    } else {\n      desc = 'Your server is highly multilingual with ' + n + ' languages and no single group above ' + Math.round(maxPct) + '%. <strong>All three translation modes<\/strong> are worth enabling. Use <strong>role-based translation<\/strong> so each member reads in their own language automatically. Pair it with <strong>channel translation<\/strong> for announcement channels that everyone needs to read. Keep <strong>flag translation<\/strong> on for quick on-demand translations anywhere.';\n      tags.push({ name: '\ud83d\udcfa Channel Translation', cls: 'recommended' });\n      tags.push({ name: '\ud83c\udfad Role-Based Translation', cls: 'recommended' });\n    }<\/p>\n<p>    tagContainer.innerHTML = tags.map(function(t) {\n      return '<span class=\"feature-tag ' + t.cls + '\">' + t.name + '<\/span>';\n    }).join('');<\/p>\n<p>    descEl.innerHTML = desc;\n  }<\/p>\n<p>  function drawPieChart(languages) {\n    var dpr = window.devicePixelRatio || 1;\n    var size = 280;\n    canvas.width = size * dpr;\n    canvas.height = size * dpr;\n    canvas.style.width = size + 'px';\n    canvas.style.height = size + 'px';\n    ctx.setTransform(dpr, 0, 0, dpr, 0, 0);<\/p>\n<p>    var cx = size \/ 2;\n    var cy = size \/ 2;\n    var radius = size \/ 2 - 8;\n    var startAngle = -Math.PI \/ 2;<\/p>\n<p>    ctx.clearRect(0, 0, size, size);<\/p>\n<p>    var total = languages.reduce(function(s, l) { return s + l.pct; }, 0);<\/p>\n<p>    for (var i = 0; i < languages.length; i++) {\n      var sliceAngle = (languages[i].pct \/ total) * 2 * Math.PI;\n      var endAngle = startAngle + sliceAngle;\n\n      ctx.beginPath();\n      ctx.moveTo(cx, cy);\n      ctx.arc(cx, cy, radius, startAngle, endAngle);\n      ctx.closePath();\n      ctx.fillStyle = COLORS[i % COLORS.length];\n      ctx.fill();\n\n      if (languages[i].pct >= 5) {\n        var midAngle = startAngle + sliceAngle \/ 2;\n        var labelRadius = radius * 0.65;\n        var lx = cx + Math.cos(midAngle) * labelRadius;\n        var ly = cy + Math.sin(midAngle) * labelRadius;<\/p>\n<p>        ctx.fillStyle = '#fff';\n        ctx.font = 'bold 11px -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif';\n        ctx.textAlign = 'center';\n        ctx.textBaseline = 'middle';<\/p>\n<p>        var pctText = Math.round(languages[i].pct) + '%';\n        ctx.fillText(pctText, lx, ly);\n      }<\/p>\n<p>      startAngle = endAngle;\n    }<\/p>\n<p>    ctx.beginPath();\n    ctx.arc(cx, cy, radius * 0.38, 0, 2 * Math.PI);\n    ctx.fillStyle = '#fff';\n    ctx.fill();\n  }<\/p>\n<p>  if (textarea.value.trim()) {\n    analyze();\n  }\n})();\n<\/script><\/p>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Paste your Discord server&#8217;s language breakdown and get a diversity score, translation need estimate, and feature recommendations for Interaction Bot.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-tool.php","meta":{"footnotes":""},"class_list":["post-55","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/interaction-bot.com\/blog\/wp-json\/wp\/v2\/pages\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/interaction-bot.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/interaction-bot.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/interaction-bot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/interaction-bot.com\/blog\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":0,"href":"https:\/\/interaction-bot.com\/blog\/wp-json\/wp\/v2\/pages\/55\/revisions"}],"wp:attachment":[{"href":"https:\/\/interaction-bot.com\/blog\/wp-json\/wp\/v2\/media?parent=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}