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.1k
Type-Safe i18n on RN
@hotchemi
June 22, 2018
Tweet
Share
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
240
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.1k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
7.9k
Navigation in a hybrid app
hotchemi
3
1.2k
PermissionsDispatcher × Kotlin
hotchemi
0
3k
kotlin compiler plugin
hotchemi
1
720
Rx and Preferences
hotchemi
2
150
Introducing PermissionsDispatcher
hotchemi
1
140
khronos
hotchemi
4
1.9k
Other Decks in Programming
See All in Programming
監視 やばい
syossan27
11
10k
MCP調べてみました! / Exploring MCP
uhzz
2
2.3k
Fiber Scheduler vs. General-Purpose Parallel Client
hayaokimura
1
110
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
0
1.4k
メモリウォールを超えて:キャッシュメモリ技術の進歩
kawayu
0
1.9k
Lambda(Python)の リファクタリングが好きなんです
komakichi
3
220
Ruby on Railroad: The Power of Visualizing CFG
ydah
0
220
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
1
140
AWS で実現する安全な AI エージェントの作り方 〜 Bedrock Engineer の実装例を添えて 〜 / how-to-build-secure-ai-agents
gawa
8
870
파급효과: From AI to Android Development
l2hyunwoo
0
130
Rollupのビルド時間高速化によるプレビュー表示速度改善とバンドラとASTを駆使したプロダクト開発の難しさ
plaidtech
PRO
1
180
Optimizing JRuby 10
headius
0
490
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Optimizing for Happiness
mojombo
377
70k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Six Lessons from altMBA
skipperchong
28
3.7k
How STYLIGHT went responsive
nonsquared
100
5.5k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Designing for humans not robots
tammielis
253
25k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
790
A Modern Web Designer's Workflow
chriscoyier
693
190k
RailsConf 2023
tenderlove
30
1.1k
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!