Arabic and English in one Django site: four bugs that weren't translation
I'm an architect, and I built Architectena , a professional site for architects (portfolio, CV, architecture-only jobs, office pages and a studio workspace) that runs fully in Arabic and English. It's Django 5.2 on PostgreSQL, with Celery for background work. Translating the interface was the easy part. These four problems were not in any translation file, and each one looked fine until it…
A professional architecture site called Architectena was built to display information in both Arabic and English, and it was developed using the Django framework and PostgreSQL database. The localization process went smoothly, but four issues emerged that were not addressed in the translation files.
The first problem was that the year 2026 was being displayed as 2,026 instead of the expected format. This occurred because Django automatically groups every integer with a thousand separator when it is rendered in a template. To resolve this issue, the USE_THOUSAND_SEPARATOR setting was changed to False in the project settings.
The second issue was that despite having a comprehensive .po catalogue with zero untranslated and fuzzy entries, the Arabic pages still displayed English filter bars. This was due to the Arabic names for various elements, such as skills, specialties, office fields, and job fields, being blank in the vocabulary models. The solution was to ensure that all shared terms had a single mapping in the database and to create a module that would handle translations for these terms.
The third problem involved Arabic number formats. Django looked for a module-specific setting to format numbers according to the project's style guide. By overriding the FORMAT_MODULE_PATH setting for Arabic pages, the numbers were displayed correctly, even when they appeared within right-to-left text.
The fourth and final issue was that the site was not protected from being used as training data by AI systems. This issue was addressed by generating a robots.txt file from a Python list of AI-training user agents. To ensure that both the promise page and robots.txt remained consistent, the list was included in both files, preventing any discrepancies between them.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.