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
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
470
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
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
430
色即是空、空即是色、データサイエンス
kamoneggi
1
200
バックエンドにElysiaJSを採用して気付いた、良い点・悪い点
wanko_it
1
180
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
140
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
220
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.2k
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
380
デフォルト運用のCodeRabbit、1年で何が変わったか / How CodeRabbit Changed Our Code Review in 1 Year
bake0937
1
110
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
400
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
380
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
220
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
New Earth Scene 8
popppiees
3
2.3k
First, design no harm
axbom
PRO
2
1.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
250
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
210
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
590
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Are puppies a ranking factor?
jonoalderson
1
3.4k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
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