RORK LABJP
PRODUCT — Rork Max generates native Swift apps for iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessageNATIVE — Rork Max unlocks AR/LiDAR, Metal 3D games, Dynamic Island, Live Activities, HealthKit, and Core MLCLASSIC — The original Rork uses React Native (Expo), turning plain-English prompts into shippable iOS/Android appsFUNDING — Rork raised $2.8M from a16z (plus $15M more), reaching 743,000 monthly visits at 85% growthPRICING — Rork is free to start, with paid plans from $25/month; Rork Max is $200/monthCHOICE — Pick cross-platform Rork or Rork Max for deep Apple-native capabilities, depending on your goalPRODUCT — Rork Max generates native Swift apps for iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessageNATIVE — Rork Max unlocks AR/LiDAR, Metal 3D games, Dynamic Island, Live Activities, HealthKit, and Core MLCLASSIC — The original Rork uses React Native (Expo), turning plain-English prompts into shippable iOS/Android appsFUNDING — Rork raised $2.8M from a16z (plus $15M more), reaching 743,000 monthly visits at 85% growthPRICING — Rork is free to start, with paid plans from $25/month; Rork Max is $200/monthCHOICE — Pick cross-platform Rork or Rork Max for deep Apple-native capabilities, depending on your goal
Articles/Dev Tools
Dev Tools/2026-06-23Intermediate

Why Your Prices Show as “¥1234” on Some Phones — A Formatting Layer That Doesn't Trust Intl Alone in Expo

Same code, yet one device shows “¥1,480” and another “¥1480.” In Expo / Hermes, Intl leans on each device's locale data, so output can drift by OS and engine. Here is a resilient formatting layer that centralizes currency, number, date, and timezone handling and falls back gracefully where Intl is incomplete — with working code.

Expo95React Native178IntlLocalization5Hermes5

Premium Article

One morning a review on one of my apps said simply: "the price looks broken." The screenshot showed "¥1480" where it should have read "¥1,480" — the thousands separator had vanished. I could not reproduce it on my own test device. Not a single line of code had changed.

The cause was not the code; it was the locale data each device carries. React Native (Expo) apps usually run on the Hermes engine, and its Intl implementation leans on the device's internationalization data (ICU). So the very same Intl.NumberFormat call can produce subtly different strings depending on the OS version and language settings.

As an indie developer shipping several apps to different regions, this "bug that never happens on my phone" is the most stubborn kind. Today I want to lay out the formatting layer I actually use — one that stops trusting Intl blindly and catches breakage before release.

Why "the same code" renders differently

Intl is the ECMAScript internationalization API, but the locale data it needs — currency symbol placement, grouping separators, month names, timezone rules — is provided by the runtime. Hermes bridges that part to the device's ICU, which leaves three variables in play.

First, the OS version. Android uses the ICU bundled with the OS, so older devices carry older locale data and may lack newer currencies or regional formats. Second, the user's language and region, since the default locale derived from the system can be changed freely. Third, the engine build configuration — whether Intl is included, and how much of it.

The key insight is that Intl is not a binary "present or absent." It is "present, but with different reach per feature." NumberFormat works broadly, yet passing an arbitrary IANA name (like Asia/Tokyo) to DateTimeFormat's timeZone is silently ignored on some devices. Partial gaps like this are the real-world failure mode.

Funnel every format call through one place

The first move is to ban scattered toLocaleString() calls and hand-rolled grouping, and route all formatting through a single file. When something does break, there is exactly one place to fix.

// lib/format.ts — every format call in the app goes through here
import { getLocales } from "expo-localization";
 
// Device's primary language; fall back to Japanese if unavailable
export const APP_LOCALE = getLocales()[0]?.languageTag ?? "ja-JP";
 
// Decide once at startup whether Intl is genuinely usable
const hasIntl =
  typeof Intl !== "undefined" &&
  typeof Intl.NumberFormat === "function" &&
  // confirm the currency style itself does not throw
  (() => {
    try {
      new Intl.NumberFormat("ja-JP", { style: "currency", currency: "JPY" }).format(1);
      return true;
    } catch {
      return false;
    }
  })();
 
export function formatNumber(value: number, locale: string = APP_LOCALE): string {
  if (hasIntl) {
    return new Intl.NumberFormat(locale).format(value);
  }
  // Fallback: naive grouping every three digits
  return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}

The point is evaluating hasIntl once, inside a try/catch. Even when the Intl object exists, a rare device throws on specific options like style: "currency", so I verify it is actually callable before relying on it.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Why Intl.NumberFormat / DateTimeFormat change output across device, OS, and engine — and how to catch the breakage before shipping
A single format module for currency, numbers, dates, and relative time, with working fallback code
Graceful degradation for devices where arbitrary IANA timezones are ignored, plus a store-UTC / display-locale separation
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Dev Tools2026-03-15
Getting Started with Latest Performance Optimization Techniques in Expo SDK 55
Comprehensive guide to Expo SDK 55's Hermes V1, EAS build caching, and modal improvements. Learn the latest performance optimization techniques with implementation examples.
Dev Tools2026-06-23
The Private Screen That Lingers in the App Switcher — Hiding the Snapshot iOS Takes the Moment You Background Your App
When you send a React Native app generated by Rork to the background, iOS photographs the current screen for the App Switcher and writes it to disk. Journals and personal input screens linger there in plain sight. This walks through the iOS privacy overlay (why inactive, not background), Android's FLAG_SECURE, scoping it to sensitive screens only, and screenshot detection — all in working code.
Dev Tools2026-06-22
When a Poisoned Cache Crashes Your App on Every Launch — Designing a Safe-Mode Boot Your Users Can Escape On Their Own
When a persisted cache goes bad and the app crashes at the same spot on every launch, the only option left to the user is to reinstall. This article designs a safe-mode boot for Expo (React Native): the app counts its own early crashes, confirms a launch only once it becomes interactive, and resets just the dangerous state in graduated steps.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →