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
Type-Safe i18n on RN
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
@hotchemi
June 22, 2018
Programming
2
1.2k
Type-Safe i18n on RN
@hotchemi
June 22, 2018
Tweet
Share
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
280
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.4k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.2k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.3k
kotlin compiler plugin
hotchemi
1
790
Rx and Preferences
hotchemi
2
170
Introducing PermissionsDispatcher
hotchemi
1
170
khronos
hotchemi
4
2k
Other Decks in Programming
See All in Programming
CSC307 Lecture 11
javiergs
PRO
0
580
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
14
9.1k
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
180
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
630
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
220
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
120
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
1
390
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
190
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
290
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
180
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
140
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
Thoughts on Productivity
jonyablonski
75
5.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
430
Between Models and Reality
mayunak
2
220
We Have a Design System, Now What?
morganepeng
55
8k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
96
Git: the NoSQL Database
bkeepers
PRO
432
66k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
170
The Invisible Side of Design
smashingmag
302
51k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
260
Transcript
Type-Safe i18n on RN Quipper Limited @hotchemi
7/19 Thu 19:30~22:00
react-native-i18n user?!
• It’s OK, but... • key name can be long
and nested • gotta move around definition and code • can’t detect an error in compile time • “missing [key name] translation”
None
• quipper/react-native-i18n-ts • paired with TypeScript • inspired by R.java
mechanism • strong IDE support • compile time check
Demo
• Under the hood • Generate d.ts file from definition
• with TypeScript compiler API
declare module "react-native-i18n" { var fallbacks: boolean; var translations: {
[keys: string]: any; }; function t(key: "common.cancel", opts: { value: any; }): string; function t(key: "common.ok"): string; } // for json loading declare module "*.json" { const value: any; export default value; }
• Installation • yarn add -D react-native-i18n-ts • set “model”
and “outputDir” in package.json • tweak filesGlob in tsconfig.json • execute “yarn i18n-ts” command
Enjoy!