Explore how bilingual users naturally mix languages—and why your UI should embrace code-switching rather than fight it.

Amira Hassan
Linguist and typographer specializing in Arabic script history and evolution.
Walk into any café in Dubai, Beirut, or Casablanca, and you'll hear something like this:
"أنا going to the mall بعدين، you coming معي؟"
This seamless mixing of Arabic and English—known as code-switching—is how millions of people actually communicate. It's not confusion or poor language skills; it's a sophisticated linguistic practice that reflects the reality of multilingual life.
Yet most applications force users to pick a single language and stick with it. This creates friction between how people actually think and communicate and how we ask them to interact with our interfaces.
Code-switching is the practice of alternating between two or more languages within a single conversation or even a single sentence. It happens naturally among bilingual speakers and serves important social and cognitive functions.
In the Gulf states, it's incredibly common to mix Arabic and English:
Studies show that code-switching is more cognitively complex than speaking a single language. Bilingual users who code-switch are expert language managers, not confused speakers.
Arabizi (also called "Franco-Arab" or "3arabeezy") is Arabic written using Latin letters and numbers to represent sounds that don't exist in the Latin alphabet.
Numbers represent Arabic sounds:
Examples:
mar7aba9aba7 el5eirma3leshinshallah or inshaa2allah"When I chat with friends, I use Arabizi. It feels more casual than formal Arabic script, and faster than switching keyboards. But for work documents, I switch to proper Arabic."
While Arabizi was born from technical limitations, it's now a cultural choice. Many young Arabs prefer it for informal communication even when Arabic keyboards are easily available.
Don't assume Arabizi is disappearing. For many users, especially in informal contexts like chat and social media, it remains the preferred way to write Arabic casually.
Let's look at how successful regional apps handle bilingual users.
Language approach: Primarily Arabic interface with English brand names
Code-switching examples:
What they do well:
Language approach: Fully localized interfaces but embraces English restaurant names
Code-switching examples:
What they do well:
Language approach: Fully bilingual with smart language mixing
Code-switching examples:
What they do well:


<!-- ❌ Forcing consistency creates awkwardness -->
<button>أضف إلى حقيبة التسوق</button>
<!-- "Shopping bag" translation feels unnatural -->
<!-- ✅ Let users speak naturally -->
<button>أضف للـ Cart</button>
<!-- Mixing feels natural to bilingual users -->Principle: If your users naturally use English words in Arabic sentences, your UI can too—strategically.
// Good: Brand names untranslated
<ProductCard
brand="Nike"
name="Air Max 270"
description="حذاء رياضي مريح للاستخدام اليومي"
/>
// Bad: Transliterating brand names
<ProductCard
brand="نايكي" // Awkward and reduces recognition
name="إير ماكس ٢٧٠"
description="حذاء رياضي مريح للاستخدام اليومي"
/>Many technical terms are more recognizable in English:
Commonly kept English:
Test with real users. Some technical terms should be translated, others feel more natural in English. There's no universal rule—it depends on your audience and context.
<!-- Search that works with mixed input -->
<input
type="search"
placeholder="ابحث عن منتجات، brands، أو categories"
lang="ar"
/>Your search should handle:
Don't force translation of user reviews, comments, or messages. Users will naturally code-switch:
<!-- User review as written -->
<div class="review">
<p lang="ar">
المنتج حلو بس the delivery كان متأخر شوي
</p>
<span class="author">@user123</span>
</div>Apply the lang attribute to the container, but let the mixed content exist naturally.
| UI Element | Recommendation | Example |
|---|---|---|
| Brand names | Always keep original | "Careem", "Noon", "Apple" |
| Product names | Keep original | "iPhone 15 Pro", "Galaxy S24" |
| Interface actions | Localize fully | "أضف إلى السلة" not "Add to cart" |
| Technical specs | Context-dependent | "RAM", "Storage" often stay English |
| Categories | Localize | "إلكترونيات" not "Electronics" |
| User content | Never modify | Show as user wrote it |
| Numbers & units | Mixed is OK | "99 ريال", "5 km" |
| Error messages | Localize fully | Users need to understand problems |
// ❌ Bad: Forcing Arabic based on location
if (userCountry === 'SA' || userCountry === 'AE') {
setLanguage('ar');
}
// ✅ Better: Ask or remember preference
const userLanguage = localStorage.getItem('preferred-language')
|| navigator.language
|| 'en'; // Sensible defaultWhy this matters:
// Language switcher always accessible
<LanguageSwitcher>
<option value="ar">العربية</option>
<option value="en">English</option>
<option value="fr">Français</option>
</LanguageSwitcher>Best practices:
Place the language switcher where users expect it: top-right corner in LTR layouts, top-left in RTL layouts. Use a globe icon 🌐 for universal recognition.
Some platforms let users set language preferences per content type:
const userPreferences = {
interfaceLanguage: 'ar', // UI in Arabic
contentLanguage: 'en', // Articles in English
notificationLanguage: 'ar', // Notifications in Arabic
supportLanguage: 'en' // Customer support in English
};This recognizes that users may want Arabic UI but English content (common for tech news, for example).
When you have Arabic and English in the same line:
<!-- Wrapper has base direction -->
<p dir="rtl">
اشترِ
<span lang="en">iPhone 15 Pro</span>
الآن بسعر
<span dir="ltr">$999</span>
</p>Renders as:
الآن بسعر $999 iPhone 15 Pro اشترِThe Unicode Bidirectional Algorithm handles this automatically, but you can help it:
/* Isolate embedded content */
[lang="en"] {
unicode-bidi: isolate;
}
/* Keep numbers LTR */
.price {
direction: ltr;
unicode-bidi: embed;
}Be careful with punctuation in mixed-direction text. Periods, commas, and question marks can appear in unexpected places. Test thoroughly with real content.
Chat is where code-switching happens most naturally.
<ChatMessage dir="auto" lang="ar">
<Avatar user={user} />
<MessageBubble>
السلام عليكم! I sent you the document
</MessageBubble>
<Timestamp>2:34 PM</Timestamp>
</ChatMessage>Use dir="auto" for chat messages. The browser will detect the first strong directional character and set direction accordingly.
For extra polish, detect and render Arabizi:
function isArabizi(text) {
// Contains Latin letters AND Arabic-indicating numbers
const hasLatinLetters = /[a-zA-Z]/.test(text);
const hasArabiziNumbers = /[0-9]/.test(text);
const hasArabicKeywords = /\b(inshallah|wallah|yalla|habibi)\b/i.test(text);
return hasLatinLetters && (hasArabiziNumbers || hasArabicKeywords);
}
// Style Arabizi messages differently (optional)
if (isArabizi(messageText)) {
messageClass += ' arabizi';
}You probably don't want to convert Arabizi to Arabic script (users chose Arabizi intentionally), but you might want to:
<FormField>
<label htmlFor="fullName">
{lang === 'ar' ? 'الاسم الكامل' : 'Full Name'}
</label>
<input
id="fullName"
type="text"
dir="auto" // Adapts to input content
placeholder={
lang === 'ar'
? 'مثال: أحمد محمد'
: 'e.g., Ahmed Mohamed'
}
/>
</FormField>// E-commerce checkout - naturally bilingual
<form>
<input
name="fullName"
placeholder="الاسم الكامل"
dir="auto"
/>
<input
name="email"
type="email"
placeholder="Email"
dir="ltr" // Email is always LTR
/>
<input
name="phone"
type="tel"
placeholder="رقم الجوال"
dir="ltr" // Phone numbers are LTR
/>
<input
name="address"
placeholder="العنوان"
dir="auto" // Address might mix scripts
/>
</form>Code-switching is natural: Bilingual users mix languages in speech and expect to do so in interfaces
Don't force purity: Letting technical terms or brand names stay English in Arabic interfaces is often more natural
Arabizi is real: Millions use it daily. Your search and chat should handle it
Never translate proper nouns: Brand names, product names, and people's names stay in original form
Respect user-generated content: Don't force-translate reviews, comments, or messages
Make switching easy: Language switcher should be accessible and remember preferences
Use dir="auto": For user-generated content, let the browser detect direction
Test with real users: What "feels natural" varies by region and demographic
Think per-context: Users may want different languages for UI, content, and notifications
Study successful local apps: Careem, Noon, and Talabat have refined bilingual UX through real usage
Explore how bilingual users naturally mix languages—and why your UI should embrace code-switching rather than fight it.

Amira Hassan
Linguist and typographer specializing in Arabic script history and evolution.
Walk into any café in Dubai, Beirut, or Casablanca, and you'll hear something like this:
"أنا going to the mall بعدين، you coming معي؟"
This seamless mixing of Arabic and English—known as code-switching—is how millions of people actually communicate. It's not confusion or poor language skills; it's a sophisticated linguistic practice that reflects the reality of multilingual life.
Yet most applications force users to pick a single language and stick with it. This creates friction between how people actually think and communicate and how we ask them to interact with our interfaces.
Code-switching is the practice of alternating between two or more languages within a single conversation or even a single sentence. It happens naturally among bilingual speakers and serves important social and cognitive functions.
In the Gulf states, it's incredibly common to mix Arabic and English:
Studies show that code-switching is more cognitively complex than speaking a single language. Bilingual users who code-switch are expert language managers, not confused speakers.
Arabizi (also called "Franco-Arab" or "3arabeezy") is Arabic written using Latin letters and numbers to represent sounds that don't exist in the Latin alphabet.
Numbers represent Arabic sounds:
Examples:
mar7aba9aba7 el5eirma3leshinshallah or inshaa2allah"When I chat with friends, I use Arabizi. It feels more casual than formal Arabic script, and faster than switching keyboards. But for work documents, I switch to proper Arabic."
While Arabizi was born from technical limitations, it's now a cultural choice. Many young Arabs prefer it for informal communication even when Arabic keyboards are easily available.
Don't assume Arabizi is disappearing. For many users, especially in informal contexts like chat and social media, it remains the preferred way to write Arabic casually.
Let's look at how successful regional apps handle bilingual users.
Language approach: Primarily Arabic interface with English brand names
Code-switching examples:
What they do well:
Language approach: Fully localized interfaces but embraces English restaurant names
Code-switching examples:
What they do well:
Language approach: Fully bilingual with smart language mixing
Code-switching examples:
What they do well:


<!-- ❌ Forcing consistency creates awkwardness -->
<button>أضف إلى حقيبة التسوق</button>
<!-- "Shopping bag" translation feels unnatural -->
<!-- ✅ Let users speak naturally -->
<button>أضف للـ Cart</button>
<!-- Mixing feels natural to bilingual users -->Principle: If your users naturally use English words in Arabic sentences, your UI can too—strategically.
// Good: Brand names untranslated
<ProductCard
brand="Nike"
name="Air Max 270"
description="حذاء رياضي مريح للاستخدام اليومي"
/>
// Bad: Transliterating brand names
<ProductCard
brand="نايكي" // Awkward and reduces recognition
name="إير ماكس ٢٧٠"
description="حذاء رياضي مريح للاستخدام اليومي"
/>Many technical terms are more recognizable in English:
Commonly kept English:
Test with real users. Some technical terms should be translated, others feel more natural in English. There's no universal rule—it depends on your audience and context.
<!-- Search that works with mixed input -->
<input
type="search"
placeholder="ابحث عن منتجات، brands، أو categories"
lang="ar"
/>Your search should handle:
Don't force translation of user reviews, comments, or messages. Users will naturally code-switch:
<!-- User review as written -->
<div class="review">
<p lang="ar">
المنتج حلو بس the delivery كان متأخر شوي
</p>
<span class="author">@user123</span>
</div>Apply the lang attribute to the container, but let the mixed content exist naturally.
| UI Element | Recommendation | Example |
|---|---|---|
| Brand names | Always keep original | "Careem", "Noon", "Apple" |
| Product names | Keep original | "iPhone 15 Pro", "Galaxy S24" |
| Interface actions | Localize fully | "أضف إلى السلة" not "Add to cart" |
| Technical specs | Context-dependent | "RAM", "Storage" often stay English |
| Categories | Localize | "إلكترونيات" not "Electronics" |
| User content | Never modify | Show as user wrote it |
| Numbers & units | Mixed is OK | "99 ريال", "5 km" |
| Error messages | Localize fully | Users need to understand problems |
// ❌ Bad: Forcing Arabic based on location
if (userCountry === 'SA' || userCountry === 'AE') {
setLanguage('ar');
}
// ✅ Better: Ask or remember preference
const userLanguage = localStorage.getItem('preferred-language')
|| navigator.language
|| 'en'; // Sensible defaultWhy this matters:
// Language switcher always accessible
<LanguageSwitcher>
<option value="ar">العربية</option>
<option value="en">English</option>
<option value="fr">Français</option>
</LanguageSwitcher>Best practices:
Place the language switcher where users expect it: top-right corner in LTR layouts, top-left in RTL layouts. Use a globe icon 🌐 for universal recognition.
Some platforms let users set language preferences per content type:
const userPreferences = {
interfaceLanguage: 'ar', // UI in Arabic
contentLanguage: 'en', // Articles in English
notificationLanguage: 'ar', // Notifications in Arabic
supportLanguage: 'en' // Customer support in English
};This recognizes that users may want Arabic UI but English content (common for tech news, for example).
When you have Arabic and English in the same line:
<!-- Wrapper has base direction -->
<p dir="rtl">
اشترِ
<span lang="en">iPhone 15 Pro</span>
الآن بسعر
<span dir="ltr">$999</span>
</p>Renders as:
الآن بسعر $999 iPhone 15 Pro اشترِThe Unicode Bidirectional Algorithm handles this automatically, but you can help it:
/* Isolate embedded content */
[lang="en"] {
unicode-bidi: isolate;
}
/* Keep numbers LTR */
.price {
direction: ltr;
unicode-bidi: embed;
}Be careful with punctuation in mixed-direction text. Periods, commas, and question marks can appear in unexpected places. Test thoroughly with real content.
Chat is where code-switching happens most naturally.
<ChatMessage dir="auto" lang="ar">
<Avatar user={user} />
<MessageBubble>
السلام عليكم! I sent you the document
</MessageBubble>
<Timestamp>2:34 PM</Timestamp>
</ChatMessage>Use dir="auto" for chat messages. The browser will detect the first strong directional character and set direction accordingly.
For extra polish, detect and render Arabizi:
function isArabizi(text) {
// Contains Latin letters AND Arabic-indicating numbers
const hasLatinLetters = /[a-zA-Z]/.test(text);
const hasArabiziNumbers = /[0-9]/.test(text);
const hasArabicKeywords = /\b(inshallah|wallah|yalla|habibi)\b/i.test(text);
return hasLatinLetters && (hasArabiziNumbers || hasArabicKeywords);
}
// Style Arabizi messages differently (optional)
if (isArabizi(messageText)) {
messageClass += ' arabizi';
}You probably don't want to convert Arabizi to Arabic script (users chose Arabizi intentionally), but you might want to:
<FormField>
<label htmlFor="fullName">
{lang === 'ar' ? 'الاسم الكامل' : 'Full Name'}
</label>
<input
id="fullName"
type="text"
dir="auto" // Adapts to input content
placeholder={
lang === 'ar'
? 'مثال: أحمد محمد'
: 'e.g., Ahmed Mohamed'
}
/>
</FormField>// E-commerce checkout - naturally bilingual
<form>
<input
name="fullName"
placeholder="الاسم الكامل"
dir="auto"
/>
<input
name="email"
type="email"
placeholder="Email"
dir="ltr" // Email is always LTR
/>
<input
name="phone"
type="tel"
placeholder="رقم الجوال"
dir="ltr" // Phone numbers are LTR
/>
<input
name="address"
placeholder="العنوان"
dir="auto" // Address might mix scripts
/>
</form>Code-switching is natural: Bilingual users mix languages in speech and expect to do so in interfaces
Don't force purity: Letting technical terms or brand names stay English in Arabic interfaces is often more natural
Arabizi is real: Millions use it daily. Your search and chat should handle it
Never translate proper nouns: Brand names, product names, and people's names stay in original form
Respect user-generated content: Don't force-translate reviews, comments, or messages
Make switching easy: Language switcher should be accessible and remember preferences
Use dir="auto": For user-generated content, let the browser detect direction
Test with real users: What "feels natural" varies by region and demographic
Think per-context: Users may want different languages for UI, content, and notifications
Study successful local apps: Careem, Noon, and Talabat have refined bilingual UX through real usage