When we launched the RahaLune Bulk QR Code Generator, it was a fully functional, client-side React application capable of generating up to 500 custom QR codes from a CSV file.
But there was a problem. It was English-only. For a tool designed to help global businesses, event planners, and inventory managers, this was a massive barrier.
Today, we rolled out a massive update. The entire Bulk Generator is now natively translated into 10 languages, complete with full Right-to-Left (RTL) layout support.
Here is a look at how we handled the localization entirely on the client-side.
The Translation Architecture
Since RahaLune is a 100% client-side app, we didn't want to rely on an API to fetch translations. We wanted the site to remain incredibly fast, even if the user switched languages multiple times.
We used standard JSON files for each language (en.json, fr.json, ar.json, etc.). When the user selects a language from the header dropdown, or visits a localized URL (like ?lang=fr), the app dynamically imports the corresponding JSON file and updates the React context.
This keeps the initial bundle size small and ensures that the translation happens instantly.
Handling the RTL Layout Challenge
Supporting Arabic and Urdu wasn't just about translating the text—it required a complete layout flip.
If you are building an app with RTL support, the golden rule is to avoid hardcoding directional CSS. Instead of using margin-left or padding-right, you should use CSS logical properties:
-
margin-inline-startinstead ofmargin-left -
padding-inline-endinstead ofpadding-right
We also dynamically update the <html> tag based on the selected language to trigger the browser's native RTL rendering:
javascript
document.documentElement.setAttribute('dir', currentLanguage === 'ar' || currentLanguage === 'ur' ? 'rtl' : 'ltr');
This single attribute ensures that flexbox layouts, grid systems, and text alignment seamlessly flip for RTL languages. The 3-step wizard, the input tabs, and the preview grid all mirror perfectly without needing separate CSS files.
Fixing UI Breakage with Longer Text
German and French text is often 20-30% longer than English. When you have tight UI components like pill-shaped tabs ("Paste List", "Upload CSV", "Manual Entry"), this causes major layout breakage.
To fix this, we ensured our CSS had flexible containers. We used text-wrap: balance and allowed certain buttons to grow gracefully rather than clipping the text. For the input tabs, we ensured they had a minimum height so the layout didn't look jagged when some tabs had longer translations than others.
SEO and Hreflang Tags
Since we support 10 languages, we had to ensure search engines understood the site structure. We dynamically update the <title>, <meta name="description">, and Open Graph tags based on the active language.
More importantly, we implemented hreflang tags in the <head> to tell Google exactly where the different language versions are hosted:
html
<link rel="alternate" hreflang="en" href="https://rahalune-qr-studio.vercel.app/bulk?lang=en" />
<link rel="alternate" hreflang="fr" href="https://rahalune-qr-studio.vercel.app/bulk?lang=fr" />
<link rel="alternate" hreflang="ar" href="https://rahalune-qr-studio.vercel.app/bulk?lang=ar" />
This prevents duplicate content penalties and ensures that a user searching in French finds the French version of the tool.
Maintaining 100% Client-Side Privacy
The core promise of RahaLune is privacy. We don't have a backend. We don't store user data. We don't track analytics.
Adding 10 languages didn't change that. All translation loading, CSV processing, ZIP generation, and QR code rendering happen directly in the browser. The user's data never leaves their device.
Try It Out
We now have a Bulk Generator that speaks 10 languages, handles RTL flawlessly, and remains 100% free forever.
If you want to see how the RTL layout handles the CSV upload flow, switch the language to Arabic or Urdu using the header dropdown here:
Try the Multi-Language Bulk QR Generator
Let me know what you think of the implementation!
Top comments (0)