Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Angular route localization
Search
Miroslav Jonaš
May 10, 2017
Programming
360
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Angular route localization
Miroslav Jonaš
May 10, 2017
More Decks by Miroslav Jonaš
See All by Miroslav Jonaš
The dark art of code optimization
meeroslav
0
71
Drum 'n' JS
meeroslav
0
88
Monorepo demystified: Breaking the myth
meeroslav
0
79
Making the Argument for Monorepos
meeroslav
0
66
Scaling Vendure with Nx
meeroslav
0
200
Don't let compilation set the length of your Glühwein break
meeroslav
0
110
Vanquishing deployment dragons with Nx wizardry
meeroslav
0
280
Don't let compilation set the length of your coffee break
meeroslav
0
160
The other JavaScript performance (no one is talking about)
meeroslav
0
320
Other Decks in Programming
See All in Programming
sbt 2.0: takeoff
eed3si9n
0
130
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
550
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
960
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
550
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
3
4.4k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
200
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
140
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
250
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
パスワード再設定メールのURLについて知っておこう
uyuki234
0
130
Featured
See All Featured
Everyday Curiosity
cassininazir
0
350
Fireside Chat
paigeccino
43
4.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
The agentic SEO stack - context over prompts
schlessera
0
970
Un-Boring Meetings
codingconduct
0
450
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
700
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
530
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Six Lessons from altMBA
skipperchong
29
4.5k
Music & Morning Musume
bryan
48
7.4k
Transcript
ANGULAR ROUTE LOCALIZATION ANGULAR MEETUP / APRIL 2017
ANGULAR ROUTE LOCALIZATION WHAT IS IT? ▸ Route localization ▸
Angular package ▸ Built for version 2+ ▸ Typescript ▸ v0.7.0
ANGULAR ROUTE LOCALIZATION WHY WOULD YOU CARE? www.site.com?page=98cf9c41-00fe-4f39-a813-91fc8a125770 www.site.com/users/4/account/profile www.site.com/watumiaji/4/akaunti/wasifu
‣ Do I support multiple languages? ‣ Do I plan to support multiple languages? ‣ Can I guarantee there will be no language support?
THE STORY BEHIND
ANGULAR ROUTE LOCALIZATION HOW DOES IT WORK? ▸ APP_INITIALIZER to
hijack the routes ▸ Route data property ▸ [routerLink] + Pipe ▸ Service for dynamic routes ▸ StartNavigation event ▸ ngx-translate (currently)
ANGULAR ROUTE LOCALIZATION [ { path: ‘home’, component: HomeComp },
{ path: ‘users’, children: [ { path: ‘’, component: UsersComp }, { path: ‘:id’, component: UserComp }, { path: ‘:id/account’, component: AccountComp} ] } ] original routes [ { path: ‘’, redirectTo: ‘en’, pathMatch: ‘full’ }, { path: ‘de’, children: [ { path: ‘startseite’, component: HomeComp }, { path: ‘benutzer’, children: [ { path: ‘’, component: UsersComp }, { path: ‘:id’, component: UserComp }, { path: ‘:id/bericht’, component: AccountComp} ] } ] } ] translated routes (*de)
ANGULAR ROUTE LOCALIZATION { “ROUTER.users”: “benutzer”, “ROUTER.profile”: “profil”, “ROUTER.account”: “bericht”
} + /users/4/account/profile = de/benutzer/4/bericht/profil i18n/de.json
ANGULAR ROUTE LOCALIZATION BUT NOT SO SIMPLE… ▸ AOT vs
Lazy loading ▸ No event after lazy load ▸ Router changes
TL;DEMO
ANGULAR ROUTE LOCALIZATION CURRENT STATE ▸ Lazy loading still not
there ▸ Tight coupling with ngx-translate ▸ Use it ▸ Find issues ▸ Help solve them
ANGULAR ROUTE LOCALIZATION ▸ npm install —save localize-router ▸ https://www.npmjs.com/package/localize-router
▸ https://github.com/Greentube/localize-router ▸ @meeroslav ▸ https://github.com/meeroslav
THANK YOU