Julian Henry

Mr. Worldwide: Multilingual GIFs

4 min read

Mr. Worldwide takes one word (Hello or Love, the two it ships translations for) and turns it into a looping GIF. Each frame is a translation in a different language, optionally over a country photograph. English, then Spanish, and on through Tibetan, Japanese, Amharic, Yoruba, and the rest of the 80+ languages.

Demo

Demos

Hello

Hello translated into many languages

Love

Love translated into many languages

Love with regional backgrounds

Love with country-specific backgrounds

Flag colors and rainbow text

Love rendered with flag colors

Rainbow text demo

The Hard Part: Finding a Font for Every Script

Generating a GIF is easy. Pillow does that in five lines. The hard problem is rendering text correctly in the two dozen writing systems those 80+ languages use.

“Hello” in English uses Latin characters. “こんにちは” uses Japanese hiragana. “مرحبا” uses Arabic script (right-to-left). “สวัสดี” uses Thai. “ሰላም” uses Ethiopic. “བཀྲ་ཤིས་བདེ་ལེགས” uses Tibetan. Each of these scripts needs a different font, and many system fonts cover only a handful.

Mr. Worldwide bundles two dozen Google Noto fonts. For each translation, it picks the matching Noto face from the language code, or failing that from the Unicode range of its characters: Arabic → NotoSansArabic, Devanagari → NotoSansDevanagari, Chinese → NotoSansSC, Japanese → NotoSansJP, and so on. The colour modes (--rainbow, --use_flag_colors) shape the whole word first and only then paint it letter by letter, so Arabic still joins, Hebrew still runs right to left, and Thai and Tamil marks stay on their letters.

Font sizing is automatic too. “Hello” is five compact Latin letters; “こんにちは” is five wide kana. The tool measures the rendered width of each translation and shrinks the font only as far as needed to fit 90% of the frame width, so nothing clips and short words stay large.

Smart Contrast Coloring

White text on a bright sky disappears. Black text on a dark scene disappears. Over a country photograph, legibility is the whole game.

For the patch of background behind the text in each frame:

  1. Cluster its pixels into three dominant colors with scipy.cluster.vq.kmeans
  2. Find the strongest background hues
  3. Pick a text color with the opposite lightness, near-full saturation, and the hue farthest from those

Pale magenta over a dark forest. Deep navy over a sunlit beach. Red over a gray cityscape.

Flag-Color Text

Alternate mode: paint each character from the country’s flag palette. “Hola” in Spanish red/yellow/red. “Bonjour” in blue/white/red. “Hallo” in black/red/gold.

Flag colors come from SVG fills in banderas/. The palette is laid across each word in contiguous bands, in stripe order.

Flag Hello

Install

git clone https://github.com/juleshenry/mr.worldwide.git
cd mr.worldwide
bash setup.sh
source venv/bin/activate

Downloading extra background images is optional:

python3 src/download_assets.py

Make a GIF

Full experience, with translations, backgrounds, and smart contrast:

python3 src/mr_worldwide.py \
  --text "Love" \
  --use_icons \
  --smart_color \
  --delay 500 \
  --gif_path "love_worldwide.gif"

Text only:

python3 src/mr_worldwide.py --text "Hello" --size "512,512" --delay 500

Custom sequence:

python3 src/mr_worldwide.py \
  --text_array "Hola,Bonjour,Ciao,Hallo" \
  --rainbow \
  --delay 300

Options

Option Description
--text Word to translate (Hello or Love)
--text_array Custom comma-separated strings instead of translations
--use_icons Country-specific background images
--smart_color High-contrast text colors from the background
--rainbow Shifting rainbow text
--use_flag_colors Color text from the country’s flag
--sine_delay Hold each frame in turn for this many ms, one pass per frame
--size width,height
--delay Milliseconds between frames
--languages ISO codes or all
--gif_path Output path

The example gallery has permutation scripts for the major option combinations, each with a pre-generated demo GIF.

Design Decisions

Local translations, not an API. The 80+ strings live in translations.json. Machine-translation APIs are rate-limited, cost money, and wobble on single-word, context-free inputs. A curated list is checked once and then stays put.

Deduplication. “Love” is “Cinta” in both Indonesian and Malay. Identical strings collapse to one frame.

Geographic ordering. Europe → Asia → Africa → Americas → Oceania, with a few priority languages first, so the GIF walks the map instead of shuffling a bag of codes.

Background sourcing. Country photos come from Pexels and Wikimedia Commons into per-country directories. A random pick per country means rerunning with the same options still changes the pictures.

Internationalization stops being a string-lookup problem the moment text has to sit on an image. Fonts, sizing, contrast, and sequence are the actual engineering.

Cite this post
@misc{henry2026mrworldwide,
  author       = {Henry, Julian},
  title        = {Mr. Worldwide: Multilingual GIFs},
  year         = {2026},
  month        = {March},
  howpublished = {\url{https://juleshenry.github.io/blog/2026/03/30/Mr-Worldwide}},
  note         = {Blog post}
}