LibLocaleOverride

A small embeddable library that lets an addon offer its own in-game language picker — so a player can read your addon in Dutch while their WoW client runs in English, without touching any other addon.

LibLocaleOverride — Per-Addon Language Override for WoW Addons

A small embeddable library that lets an addon offer its own in-game language picker — so a player can read your addon in Dutch while their WoW client runs in English, without touching any other addon. It bundles fonts for scripts WoW can't render (Thai, Indic, CJK, Hebrew, Arabic and more), supports right-to-left languages, and refreshes the UI on a switch without a /reload.

The Problem

WoW addons normally lock their language to the game client via GetLocale(). A player whose client is English can't read a supported addon in their native language, and addons can't offer languages WoW doesn't ship at all. The one existing override — the global GAME_LOCALE (and the AddonLocale addon that wraps it) — is all-or-nothing: it retargets every AceLocale addon at once, and it can't switch at runtime.

The Solution

LibLocaleOverride keeps every registered locale table and merges them on demand (an English baseline + the chosen language on top, so a partial translation still falls back cleanly) — per addon and switchable live. Picking a language for one addon never affects another. A bundled-font manager covers non-Latin scripts, and a change callback lets widgets refresh in place.

What You Get

  • Per-addon language override, switchable live. No /reload, and no effect on any addon you didn't write — GAME_LOCALE is never touched.
  • Every registered locale table is kept and merged on demand (English baseline + chosen language on top), so a partial translation falls back key-by-key instead of failing over wholesale.
  • Bundled fonts for scripts WoW can't render — Thai, Hindi/Marathi, Bengali, Punjabi, Tamil, Telugu, Hebrew, Arabic, Japanese, Korean, Chinese (Simplified & Traditional), Cyrillic and Latin. Applied per string by the script that string actually uses, so a picker listing many languages at once renders all of them — and the bundled faces carry Latin too, so English names, slash-commands and brands sitting inside translated text don't turn into boxes.
  • Right-to-left support — Hebrew and Arabic/Persian/Urdu, with contextual Arabic letter shaping and bidirectional reordering, both of which the WoW font engine does not do at all. Colour codes, item links and icons stay around the words they belong to, and multi-line text keeps its lines in order.
  • Locale-native numerals, markup-aware: digits inside colour codes, textures, atlases and hyperlinks are left alone.
  • Fonting that covers real widgets — fontstrings, whole frames recursively, buttons across every state, native Blizzard dropdown lists, and AceGUI tab strips.
  • A client-locale resolver for chat and print output, so text leaving your addon stays readable in a chat window that can't render the chosen script.
  • Optional AceGUI integration — a two-column language picker showing each language in both the current language and its own native name, and an automatic tab-font handler.
  • Offline test suite at 100% line coverage, so the per-script behaviour an English-client developer cannot see by playing is checked before it ships.

For Developers

Embed via LibStub and register your locale tables:

local LLO = LibStub("LibLocaleOverride-1.0")
LLO:RegisterLocale("MyAddon", "enUS", enUSTable, true)  -- baseline
LLO:RegisterLocale("MyAddon", "nlNL", nlNLTable)
LLO:SetStore("MyAddon", getOverrideFn, setOverrideFn)   -- your SavedVariable
LLO:ApplyStored("MyAddon")                               -- at login
local L = LLO:GetLocale("MyAddon")                       -- read L[key] at BUILD time

Add it to your addon as an external dependency — one canonical copy across your whole addon family. Read L[key] when you build a widget, never frozen at load, so a live language switch takes effect.

Then font and shape what you display:

LLO:ApplyFontToFrame("MyAddon", myWindow)   -- fontstrings + buttons, by each string's script
LLO:RegisterManagedFontString("MyAddon", fs) -- or let the library re-font it on every switch
LLO:RegisterCallback("MyAddon", RefreshUI)   -- rebuild your widgets on a switch

local line = LLO:LocalizeDigits("MyAddon", string.format(L.KILLS, n))
myText:SetText(LLO:Shape(line))              -- Shape AFTER format(), never on the template

Two guarantees worth knowing. First, fonting never resizes what it fonts: ApplyFontToFrame and ApplyFontToButton change how text renders, never a widget's size, position, anchors, parent or layout. The single exception is that a labelled button whose width isn't derived from two opposing horizontal anchors may have its width raised to fit a longer translated label — and never below the width it was built at. Give a button no label, or anchor it on both horizontal edges, to opt out entirely.

Second, Shape costs nothing on text that isn't right-to-left: a string with no Hebrew or Arabic character comes back byte-identical, so you can wrap every display string instead of branching on the active locale. It shapes each line on its own and keeps colour codes, links and textures whole around their own text. It is the UI-label subset of bidirectional layout, not the full algorithm, and has three known limits: a Latin phrase that contains a bracket pair next to right-to-left text — Foo (Bar) <hebrew> — comes back with its pieces re-ordered (a lone bracketed word, <hebrew> (Beta), is fine); an escape code in the middle of an Arabic word breaks the letter joining there; and text the game wraps by itself shows its lines in reverse order, so break long right-to-left text with your own line breaks.

Supported clients, from one TOC: Classic Era, Anniversary / Burning Crusade, Wrath, Cataclysm, Mists of Pandaria Classic, Retail (Midnight), and World of Warcraft: Forever. On Forever and Retail, text the game keeps hidden from addons (such as some tooltip lines) is left exactly as the game drew it. The compatibility list is checked by the library's own test suite against every installed addon that depends on it, so a dependant is never held back by this library showing as out of date.

Version stamps: LibStub MINOR 19; the AceGUI, RTL and language-name satellites carry their own stamps (_aceguiMinor 4, _rtlMinor 4, _namesMinor 1) and upgrade independently, so the newest copy of each file wins regardless of load order.

Recent Updates

v0.3.8 (2026-11-30) — coloured and multi-line Hebrew and Arabic text drawn the right way round

Fixed

  • In Hebrew, Arabic, Persian and Urdu, a coloured word or an item link came out with its colour starting after the text and spilling onto whatever followed it. Colours and links now wrap exactly the text they belong to.
  • Text with more than one line in those languages was drawn with its lines in reverse order, bottom line first. Each line is now drawn in its proper place.

Changed

  • Addon authors get a translation guide and a tool that lists exactly which lines a translation still needs after the English changes. Players will not see a difference.

v0.3.7 (2026-11-28) — one more hidden-text error fixed on World of Warcraft: Forever and Retail

Changed

  • Marked compatible with Retail 12.1.5.

Fixed

  • On World of Warcraft: Forever and Retail, re-fonting a window that contained a button tied to the game's own protected layout raised a Lua error. That button is now still given the right font, and its size is left exactly as the game set it. Classic Era, Anniversary and Mists of Pandaria Classic are unaffected.

v0.3.6 (2026-10-17) — tidier bookkeeping for dropdown menus

Changed

  • The library no longer keeps its own permanent record of every dropdown menu it has fonted. This mainly matters to addon authors' test suites; players will not see a difference. Nothing about how the menus look changes.

v0.3.5 (2026-09-29) — no more errors from game tooltips on World of Warcraft: Forever and Retail

Fixed

  • On World of Warcraft: Forever and Retail, the game now hides some of its own text from addons (for example tooltip lines about what's under your mouse). When an addon asked this library to re-font a window that happened to include such text, it raised a Lua error every time. That hidden text is now left exactly as the game drew it, and everything else in the window is still fonted. Classic Era, Anniversary and Mists of Pandaria Classic do not hide text this way and behave exactly as before.

v0.3.4 (2026-09-20) — loads on World of Warcraft: Forever and on Retail 12.1

Changed

  • Marked compatible with World of Warcraft: Forever (the Classic-content beta on the modern client) and with Retail 12.1 (Midnight). Addons that require this library — FastGuildInvite and Dibs among them — were being held back on those clients because a required library the game considers out of date stops the addon itself from loading. Nothing about how languages, fonts or layout behave is different.
  • The compatibility list is now checked automatically against every installed addon that depends on this library, so it cannot quietly fall behind again.
  • The documentation for right-to-left text shaping now states its one known limit plainly: a Latin phrase containing brackets, placed next to Hebrew or Arabic text, can come out with its parts re-ordered. A lone bracketed word such as "(Beta)" is fine. This was already how it behaved; the description previously over-promised.

Older release notes (v0.3.3 and earlier) are in the addon's full changelog.

Community

Bug reports, feature requests, or questions: Join the Discord.

License

MIT. The locale-merging core, the font routing and the BiDi/shaping logic are an original implementation. Bundled and adapted third-party assets: the public-domain LibStub; Google Noto and Sarabun fonts under the SIL Open Font License 1.1, each shipping its own OFL.txt under fonts/<Script>/; and the Arabic/Persian/Urdu base-letter to presentation-form tables, generated from the Unicode Arabic Presentation Forms via python-arabic-reshaper (MIT, © Abdullah Diab), with the reshaping/ligature approach seeded by Arabic_Reshaper_LUA by DiNaSoR (MIT).

LibLocaleOverride Team

profile avatar
  • 3
    Followers
  • 35
    Projects
  • 1.9M
    Downloads

More from PmptastyView all

  • Ultimate Tracker project image

    Ultimate Tracker

    Track-O-Matic allows you to track various types of information on the game screen, without having to navigate through a bunch of different UI panels.

    • 742
    • December 4, 2026
  • LibItemDB project image

    LibItemDB

    A library with all of the WoW items for use by other addons

    • 40.4K
    • December 4, 2026
  • Ultimate Guild Roster project image

    Ultimate Guild Roster

    Ultimate Guild Roster - Guild Roster Management, Shared Across Your Guild

    • 1.2K
    • December 4, 2026
  • LibAceGUIWidgets project image

    LibAceGUIWidgets

    LibAceGUIWidgets is a shared AceGUI-3.0 widget and styling library. It registers reusable, drop-in AceGUI widget types and helpers so addons share one consistent look instead of each rebuilding the same frames.

    • 355.0K
    • December 4, 2026
  • Ultimate Tracker project image

    Ultimate Tracker

    Track-O-Matic allows you to track various types of information on the game screen, without having to navigate through a bunch of different UI panels.

    • 742
    • December 4, 2026
  • LibItemDB project image

    LibItemDB

    A library with all of the WoW items for use by other addons

    • 40.4K
    • December 4, 2026
  • Ultimate Guild Roster project image

    Ultimate Guild Roster

    Ultimate Guild Roster - Guild Roster Management, Shared Across Your Guild

    • 1.2K
    • December 4, 2026
  • LibAceGUIWidgets project image

    LibAceGUIWidgets

    LibAceGUIWidgets is a shared AceGUI-3.0 widget and styling library. It registers reusable, drop-in AceGUI widget types and helpers so addons share one consistent look instead of each rebuilding the same frames.

    • 355.0K
    • December 4, 2026