Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
React.js & i18n
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Eric Ferraiuolo
January 28, 2015
Programming
490
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React.js & i18n
http://formatjs.io/
Eric Ferraiuolo
January 28, 2015
More Decks by Eric Ferraiuolo
See All by Eric Ferraiuolo
Node on the Road
ericf
1
130
Pure
ericf
7
990
YUI and The Future
ericf
2
770
YUI 3.10.0 — Go Fast
ericf
3
610
YUI, Open Source, and Community
ericf
0
480
Advocatus Diaboli – Throne of JS
ericf
8
16k
Y.App: Coordinating URL Navigation, Routing, and Managing Views
ericf
10
2.1k
Other Decks in Programming
See All in Programming
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
180
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
120
The NotImplementedError Problem in Ruby
koic
1
1.1k
はてなアカウント基盤 State of the Union
cockscomb
1
1.2k
Webフレームワークの ベンチマークについて
yusukebe
0
190
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
620
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
340
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
420
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
240
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
AIで効率化できた業務・日常
ochtum
0
160
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Evolving SEO for Evolving Search Engines
ryanjones
0
230
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.6k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
320
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
A Modern Web Designer's Workflow
chriscoyier
698
190k
Transcript
React.js & i18n @ericf - Yahoo ReactConf
1.002 2/1/2015
But I only care about English in the USA!
English 5.2% 27% Native Speakers Internet Users Source: Wikipedia
None
None
None
Formatting
None
None
function numberWithCommas(x) { var parts = x.toString().split("."); parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g,
","); return parts.join("."); } “How to print a number with commas as thousands separators in JavaScript?” 25 Answers
Intl.NumberFormat Intl.DateTimeFormat Intl.Collator
new Intl.NumberFormat().format(1000); new Intl.DateTimeFormat({ month: 'long', day : 'numeric', year
: 'numeric' }).format(Date.now()); 1,000 January 28, 2015 Intl Built-ins
<FormattedNumber value={1000} /> <FormattedDate value={Date.now()} month="long" day="numeric" year="numeric" /> React
Intl 1,000 January 28, 2015
<p className=“post-meta”> Posted <FormattedRelative value={this.props.date} /> </p> Relative Times Posted
3 hours ago
“Hello, {name}!” “You’re {age, number} years old.” String Messages
var msg = `{numComments, plural, one {# comment}
other {# comments} }`; <FormattedMessage message={msg} numComments={1} /> Pluralization 1 comment
var msg = `{numComments, plural, one {# comment}
other {# comments} }`; <FormattedMessage message={msg} numComments={1200} /> Pluralization 1,200 comments
var App = React.createClass({ mixins: [IntlMixin], render: function () {
return <FormattedNumber value={this.props.price} style="currency" currency="USD" /> } }); React.render( <App locales="fr-FR" price={1099.95} />, document.getElementById("container") ); Intl Mixin 1 099,95 $US
7.7k 150+ React Intl min + gz languages English as
default
None
CLDR ICU JS Runtimes (Intl.*) Format.js Core Format.js Integrations
Intl.MessageFormat Intl.RelativeFormat Future Intl Built-ins?
Questions? formatjs.io @ericf - Yahoo ReactConf