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
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
Swiftのレキシカルスコープ管理
kntkymt
0
200
RTSPクライアントを自作してみた話
simotin13
0
280
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
260
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
420
CSC307 Lecture 17
javiergs
PRO
0
240
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
390
Oxlintのカスタムルールの現況
syumai
5
730
1人1案件のプロダクトエンジニア時代に、"プロセス監督"としてチャレンジしたこと
non0113
0
340
Zod v4 Codec でスキーマに型変換を埋め込む REST API 設計 #TSKaigi2026
ryutaro_yako
0
160
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
290
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
170
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
380
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Statistics for Hackers
jakevdp
799
230k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
920
Optimising Largest Contentful Paint
csswizardry
37
3.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
250
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
The Invisible Side of Design
smashingmag
302
52k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Building AI with AI
inesmontani
PRO
1
1k
A Soul's Torment
seathinner
6
2.8k
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