◉RORK LABJP
●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first
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.

Expo213React Native238IntlLocalization8Hermes8

✦ 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 $15 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-08-09
Measuring Hermes Bytecode Delta Updates: One Added Module Cost 29x More Than One Changed Line
I measured OTA delta sizes against a 2.4MB Hermes bytecode bundle. Changing one line cost 2,104 bytes; adding one module cost 61,197. The widely repeated advice about stable module IDs turned out to matter least.
⬡ Dev Tools2026-09-10
I Added a Dim Screen Button, and iPhones Stayed Dark After the App Was Closed
In expo-brightness, setBrightnessAsync applies only to the current activity on Android, but changes the device brightness itself on iOS. Here is why the cleanup burden falls on one platform only, and a hook that restores brightness through AppState.
⬡ Dev Tools2026-09-04
EAS secret visibility does not keep a value out of your app — deciding prefix and visibility separately
The EXPO_PUBLIC_ prefix decides what ships inside your app; EAS visibility decides who can read it. Why stacking them blanks a value on OTA updates, and how to check your build.
📚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