Urgent.News

What's breaking now, across thousands of outlets.

Tech

How I added English to my solo-dev Unity MMO without touching 130 UI files

My game, Battle of Pirates , is a free online pirate MMO for Windows: real-time naval PvP, fleets, fortress sieges, boss events. I build it alone in Turkey, so for two years every string in the game was hardcoded Turkish. Players here search for it as an online korsan oyunu , and that was fine until the game started showing up on itch.io and IndieDB and international players arrived. The problem:…

My game, Battle of Pirates, is a free online pirate MMO for Windows. The game features real-time naval PvP, fleets, fortress sieges, and boss events. Initially, all strings in the game were hardcoded in Turkish. As I started attracting international players on platforms like itch.io and IndieDB, the game began showing up in search results for players looking for an online "korsan oyunu," or pirate game.

The challenge was that there were 1,700 unique UI strings across 130 C# files, plus hundreds of server messages sent from Node.js. The thought of changing these hardcoded strings in every file seemed daunting and risky to the live game. The solution was to translate the text after it was set but before it was displayed. A single MonoBehaviour, running late in the LateUpdate, would check each Text component and translate its string if it had changed.

This approach translated the text at display time, so the server did not need any modifications. Input fields were skipped to avoid translating player typing. When switching back to Turkish, the original string was restored. The translation process also handled trailing spaces by copying the leading and trailing spaces from the dictionary file.

After implementing this system, I added an English language toggle on the login screen. The English update was released through the game's own launcher as a regular patch. While not a full localization pipeline, this method allowed me to add English to my solo-developed MMO without any risky refactoring. The Battle of Pirates game is free to play on battleofpirates.com and the Microsoft Store.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How I built a countdown & days-since tracker with React 19, Supabase and Vercel

I wanted a place to count down to things – a trip, a birthday, a deadline – and to count up from things, like the day I started a habit.

  • Created CountMyDays to count down to events or days since starting habits
  • Built with React 19, Vite, TypeScript, Supabase, Vercel, Tailwind, and service worker
  • Data syncs between guests and signed-in users via Supabase, with accurate timer using date math

Making legacy regexes readable — without changing what they match

A pattern like this ships in real projects every day: ^(?\[(?:[A-Za-z0-9_.-]+)\])|^(?[A-Za-z_][A-Za-z0-9_]*)\s*=\s*(?"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^#\n]*)\s*(?:#.*)?$ An INI-line parser: a…

  • Legacy regexes are hard to understand due to complex structure
  • RegexTester.dev offers three readability modes: Pretty, Annotated, Minify
  • Formatting regex with x/extended flag preserves original behavior

More from Monday 26 October →