Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Type-Safe i18n on RN
Search
@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
270
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.3k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.1k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.2k
kotlin compiler plugin
hotchemi
1
780
Rx and Preferences
hotchemi
2
160
Introducing PermissionsDispatcher
hotchemi
1
160
khronos
hotchemi
4
1.9k
Other Decks in Programming
See All in Programming
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
150
Deno Tunnel を使ってみた話
kamekyame
0
230
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
130
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
250
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
160
Grafana:建立系統全知視角的捷徑
blueswen
0
140
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
4
660
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
120
Go コードベースの構成と AI コンテキスト定義
andpad
0
140
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.3k
Cap'n Webについて
yusukebe
0
150
AIコーディングエージェント(skywork)
kondai24
0
200
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.2k
A Soul's Torment
seathinner
1
2k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Docker and Python
trallard
47
3.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.4k
GraphQLとの向き合い方2022年版
quramy
50
14k
How to make the Groovebox
asonas
2
1.8k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
400
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
330
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!