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
1.2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Type-Safe i18n on RN
@hotchemi
June 22, 2018
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
290
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.5k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.2k
Navigation in a hybrid app
hotchemi
3
1.4k
PermissionsDispatcher × Kotlin
hotchemi
0
3.4k
kotlin compiler plugin
hotchemi
1
820
Rx and Preferences
hotchemi
2
180
Introducing PermissionsDispatcher
hotchemi
1
190
khronos
hotchemi
4
2k
Other Decks in Programming
See All in Programming
symfony/aiとlaravel/boost
77web
0
120
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
500
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.3k
えっ!!コードを読まずに開発を!?
hananouchi
0
170
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
560
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.2k
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
580
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
210
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
2.1k
関数型プログラミングのメリットって何だろう?
wanko_it
0
160
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Six Lessons from altMBA
skipperchong
29
4.3k
Writing Fast Ruby
sferik
630
63k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
HDC tutorial
michielstock
2
740
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
290
A Soul's Torment
seathinner
6
3k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Designing for Performance
lara
611
70k
KATA
mclloyd
PRO
35
15k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
650
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!