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
Eric Ferraiuolo
January 28, 2015
Programming
2
480
React.js & i18n
http://formatjs.io/
Eric Ferraiuolo
January 28, 2015
Tweet
Share
More Decks by Eric Ferraiuolo
See All by Eric Ferraiuolo
Node on the Road
ericf
1
120
Pure
ericf
7
970
YUI and The Future
ericf
2
750
YUI 3.10.0 — Go Fast
ericf
3
590
YUI, Open Source, and Community
ericf
0
460
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
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
170
Patterns of Patterns
denyspoltorak
0
590
Vibe codingでおすすめの言語と開発手法
uyuki234
0
180
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
150
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
190
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
40k
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
130
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
180
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2k
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
250
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
850
Featured
See All Featured
The Invisible Side of Design
smashingmag
302
51k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The World Runs on Bad Software
bkeepers
PRO
72
12k
The SEO identity crisis: Don't let AI make you average
varn
0
51
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
700
How STYLIGHT went responsive
nonsquared
100
6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
250
Test your architecture with Archunit
thirion
1
2.1k
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