A language tag controls display and formatting. Category IDs continue to control colours, grouping and ordering. The runtime uses local dictionaries and local fonts. A match in a translation dictionary does not establish font coverage or linguistic correctness.
library(ggplot2)
library(ggforma)
trips <- data.frame(site = c("N", "S"), n = c(60, 40))
words <- data.frame(variable = "site", id = rep(c("N", "S"), 2),
lang = rep(c("en", "fr"), each = 2),
label = c("North", "South", "Nord", "Sud"))
base <- ggpie(trips, "site", "n", .legend = TRUE, label = "percent")
english <- base + locale_forma("en", dictionary = words)
french <- base + locale_forma("fr", dictionary = words)
french
diagnosis <- font_check("ABC 2026", family = "sans")
head(diagnosis[c("path", "index", "fallback", "missing")])
path index fallback missing
1 C:\\WINDOWS\\Fonts\\arial.ttf 0 FALSE FALSE
2 C:\\WINDOWS\\Fonts\\arial.ttf 0 FALSE FALSE
3 C:\\WINDOWS\\Fonts\\arial.ttf 0 FALSE FALSE
4 C:\\WINDOWS\\Fonts\\arial.ttf 0 FALSE FALSE
5 C:\\WINDOWS\\Fonts\\arial.ttf 0 FALSE FALSE
6 C:\\WINDOWS\\Fonts\\arial.ttf 0 FALSE FALSE
For a mixed-language label, pass the actual string to font_check(). Its output identifies the face file used, its collection index and glyph coverage. A generic family such as sans resolves differently across machines. A regional CJK family may be necessary for the desired traditional or simplified letterforms. No fonts are bundled.
Arabic, Hebrew and mixed numbers rely on paragraph-level bidi resolution. text_direction sets the base direction. It never reverses an axis by itself. Paint-only changes preserve joined clusters in the tested Arabic and Devanagari examples. Lao and Thai use ICU dictionary break opportunities. The final appearance depends on face, script, width and device. Native-reader review remains pending for the multilingual release fixtures.
Dictionary authors can supply contextual tables or named vectors. Missing translations use the configured fallback; repeated translated names can represent different IDs. The bundled five-language statistical glossary has limited coverage and still needs specialist review. There is no automatic translation service.