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
@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
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
GoLab2025 Recap
kuro_kurorrr
0
780
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
200
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
300
クラウドに依存しないS3を使った開発術
simesaba80
0
180
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
TestingOsaka6_Ozono
o3
0
180
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
440
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
Implementation Patterns
denyspoltorak
0
130
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
400
ゲームの物理 剛体編
fadis
0
380
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Designing for Timeless Needs
cassininazir
0
96
30 Presentation Tips
portentint
PRO
1
180
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How STYLIGHT went responsive
nonsquared
100
6k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
98
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
73
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Code Review Best Practice
trishagee
74
19k
Utilizing Notion as your number one productivity tool
mfonobong
2
190
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
31
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!