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
260
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.3k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.2k
kotlin compiler plugin
hotchemi
1
770
Rx and Preferences
hotchemi
2
150
Introducing PermissionsDispatcher
hotchemi
1
160
khronos
hotchemi
4
1.9k
Other Decks in Programming
See All in Programming
認証・認可の基本を学ぼう前編
kouyuume
0
150
目的で駆動する、AI時代のアーキテクチャ設計 / purpose-driven-architecture
minodriven
11
3.9k
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
130
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
440
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.2k
「文字列→日付」の落とし穴 〜Ruby Date.parseの意外な挙動〜
sg4k0
0
360
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
130
connect-python: convenient protobuf RPC for Python
anuraaga
0
350
AIコーディングエージェント(skywork)
kondai24
0
110
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
5
1.1k
無秩序からの脱却 / Emergence from chaos
nrslib
2
12k
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
260
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.1k
For a Future-Friendly Web
brad_frost
180
10k
Building Applications with DynamoDB
mza
96
6.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Six Lessons from altMBA
skipperchong
29
4.1k
A better future with KSS
kneath
240
18k
What's in a price? How to price your products and services
michaelherold
246
12k
A designer walks into a library…
pauljervisheath
210
24k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Unsuck your backbone
ammeep
671
58k
How to Ace a Technical Interview
jacobian
280
24k
GitHub's CSS Performance
jonrohan
1032
470k
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!