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
Nuxt i18n Experience Sharing
Search
LINE Developers Taiwan
PRO
August 19, 2020
Programming
0
13k
Nuxt i18n Experience Sharing
Nuxt i18n 實戰經驗分享 @ v-tw #006
v-tw event:
https://vuejs.kktix.cc/events/v-tw-meetup-006
LINE Developers Taiwan
PRO
August 19, 2020
Tweet
Share
More Decks by LINE Developers Taiwan
See All by LINE Developers Taiwan
台大資料分析與決策社 機器學習的商業應用_Rei
line_developers_tw
PRO
0
12
政大數據分析社 機器學習的商業應用_Rei
line_developers_tw
PRO
0
23
Gemini 2025 新功能回顧 LINE Bot 完美結合
line_developers_tw
PRO
0
470
NTUAI企業參訪
line_developers_tw
PRO
0
11k
Data TECH FRESH企業參訪- Amber
line_developers_tw
PRO
0
23k
Data Team 實習分享
line_developers_tw
PRO
0
19k
Backend Intern之旅
line_developers_tw
PRO
0
28k
清大企業參訪- Ben
line_developers_tw
PRO
0
4.4k
LLM 商品規格萃取大冒險- Vila
line_developers_tw
PRO
0
2.9k
Other Decks in Programming
See All in Programming
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
320
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
160
The free-lunch guide to idea circularity
hollycummins
0
350
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
130
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
140
モダンOBSプラグイン開発
umireon
0
180
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
800
Nostalgia Meets Technology: Super Mario with TypeScript
manfredsteyer
PRO
0
110
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
250
Java 21/25 Virtual Threads 소개
debop
0
270
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
130
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
330
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Game over? The fight for quality and originality in the time of robots
wayneb77
1
150
So, you think you're a good person
axbom
PRO
2
2k
Thoughts on Productivity
jonyablonski
75
5.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
WCS-LA-2024
lcolladotor
0
500
A Soul's Torment
seathinner
5
2.5k
Google's AI Overviews - The New Search
badams
0
950
Transcript
Abel — LINE TODAY 前端工程師 2020.08.19 1X[W LQ 䋿䜗妿涢獤Ձ
Menu 1. Intro Nuxt i18n 5mins 2. Intro LINE TODAY
5mins 3. Our Problems 15mins 4. Q&A 5mins
Nuxt i18n Example
Nuxt i18n Set Locale
Nuxt i18n Lazy Load
LINE TODAY 4 Countries 2500 Messages 4 Languages
LINE TODAY Modules
LINE TODAY Async Component
Nuxt i18n lazy load 700 messages Poll Component Weather Component
Movie Component LINE TODAY i18n setup
Problem 1 Page speed
Problem 1 Page speed
Problem 1 Split Message /\.poll\./ title.poll.page /\.weather\./ info.weather.AQI /\.movie\./ bt.movie.book
poll_zh_TW.json 20 messages weather_zh_TW.json 50 messages movie_zh_TW.json 130 messages lang/zh_TW.json 700 messages 150 messages Others bt.copy
Problem 1 JSON size
Problem 1 JSON size
Problem 1 JSON size
Problem 1 JSON size Real case https://lin.ee/C2LF1Im
Problem 1 Split Message Nuxt i18n lazy load 700 messages
Poll Component Weather Component Movie Component poll_zh_TW.json 20 messages weather_zh_TW.json 50 messages movie_zh_TW.json 130 messages shared 150 messages
Problem 1 Async Component
Problem 1 Solution
Problem 1 Import Message
Problem 2 SSR
Problem 2 SSR import messages import component Async Component 1st
request 2nd request HTML with language Weather.vue Async Component HTML no language Weather.vue
Problem 2 Solution Nuxt Plugin Import 700 messages import 50
messages import component Async Component Weather.vue SSR CSR HTML with language
Problem 2 SSR Solution
Problem 2 SSR Solution
Problem 3 Shared: Module:
Problem 3 JSON vs JS literal Module: Nuxt i18n lazy
load:
Problem 3 Speed https://lin.ee/jtds26s
Problem 3 Create shared JS
Problem 3 Solution
Summary • Split big JSON into small pieces. • Only
import the messages the you need. • Server side: import the whole messages. • Client side: import messages on the fly. • Don’t use JS literal to save i18n message. Use JSON.
Example https://lin.ee/3VzyZnF nuxt-i18n-demo
Q&A
LINE TECH FRESH https://engineering.linecorp.com/zh-hant/blog/tech-fresh-2020/ 34
35