{
  "id": 20346218,
  "title": "Building a Darija Translator: Jakarta REST, an LLM, and Four Clients",
  "url": "https://urgent.news/2026/11/16/building-a-darija-translator-jakarta-rest-an-llm-and-four-clients",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-16T23:29:11.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/nouha50215/building-a-darija-translator-jakarta-rest-an-llm-and-four-clients-4paf"
  },
  "original_language": "en",
  "account": "The author developed a secure REST service capable of translating any language into Moroccan Darija and created four clients: a Chrome extension, a PHP website, a Python application, and a React Native mobile app. Darija is the everyday language spoken by over 30 million people, but many translation tools only offer Modern Standard Arabic.\n\nThe server, built using Jakarta EE 10 APIs and the JDK, runs as a WAR on Payara Micro, an embedded Jakarta EE runtime, requiring no separate application server. The security is handled through Jakarta Security and a custom IdentityStore for authentication, with a single HTTP Basic authentication mechanism.\n\nThe core of the project involves an LLM interface with two implementations: a Google Gemini client and an Ollama client for running local models. The prompt engineering plays a crucial role in generating Darija translations instead of Fus7a. The system instruction provided to the LLM ensures the output is in the Moroccan Darija dialect, using specific anchors and avoiding formatting or notes.\n\nThe Chrome extension requires manually selecting text, opening a side panel, and translating the text. The speech-to-text function and voice-to-voice mode were challenging to implement due to Chrome's restrictions. The other clients follow a similar thin layer over the HTTP call, offering PHP web forms and command-line scripts, a Python command-line interface, and a React Native mobile app.\n\nFuture improvements could include implementing token-based authentication, streaming translations for long texts, and adding reverse translation from Darija to English or French.",
  "summary": "I built a secured REST service that translates any language into Moroccan Darija with an LLM, plus four clients that call it: a Chrome extension, a PHP site, a Python app and a React Native mobile app. Darija is the everyday language of more than 30 million people, but most translation tools only offer Modern Standard Arabic (Fus7a). Fus7a is what you read in the news, not what you say at the…",
  "key_points": [
    "Secure REST service translates any language into Moroccan Darija",
    "Four clients developed: Chrome extension, PHP website, Python app, React Native mobile app",
    "LLM interface with Google Gemini and Ollama clients for local model running"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}