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
[Kaohsiung Rails meetup] 國際化影片分享網站
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
HeChien Hsu
March 29, 2014
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[Kaohsiung Rails meetup] 國際化影片分享網站
2014-03-29 分享於高雄 Rails meetup
HeChien Hsu
March 29, 2014
More Decks by HeChien Hsu
See All by HeChien Hsu
Using Git hosting
hechien
0
66
[Wheel Lab #2] Apple Service with Rails.
hechien
0
120
[Sokoos][教育訓練] Git - 1
hechien
0
180
[數位教學] 用Bootstrap製作網頁
hechien
0
1.4k
DesignYou - 專題報告投影片
hechien
0
150
[作業] 創意美學
hechien
0
87
[教育訓練] Rails Form Basic
hechien
1
88
[教育訓練] Rails Validation Basic
hechien
1
120
Rails Layout Basic
hechien
2
140
Other Decks in Programming
See All in Programming
最近”作らせてる” ローカルAIアプリの話
akit37
0
490
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
120
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
1.1k
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
150
GraphQL の onError と Nullability のこれから
quramy
0
180
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
160
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
1.1k
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
380
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
200
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.9k
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
310
Seven New Principles of Software Engineering
yegor256
0
250
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
HDC tutorial
michielstock
2
970
From π to Pie charts
rasagy
1
410
Technical Leadership for Architectural Decision Making
baasie
3
610
How STYLIGHT went responsive
nonsquared
100
6.3k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
380
Google's AI Overviews - The New Search
badams
0
1.6k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Transcript
國際化影⽚片分享網站 徐赫謙
About me • 徐赫謙 - HeChien Hsu •
[email protected]
•
http://fb.com/hechien • http://hechien.logdown.com
國際化?
I18n Internationalization
影⽚片分享?
不是真的上傳影⽚片
Share the video links
請你跟我這樣做
rails new my_videos
rails g scaffold video title link
rake db:migrate
我們需要這些 Gem
我們需要這些 Gem • rails • embedly # 抓 video link
⽤用 • faraday # embedly 說它要存在才讓我⽤用 T_T • settingslogic # 為了儲存⼀一些設定
關於「分享影⽚片」 • 其實就是透過 embedly 去抓取影⽚片資料
ShareLinkService • https://gist.github.com/hechien/ f317ebf120e573c96daf#file-share_link_service- rb • 把它放在你的 app/services 底下,命名為 share_link_service.rb
關於「國際化」 • 國際化分為兩件事 • i18n • Timezone
Internationalization • 簡稱:i18n (不然真的太⻑⾧長) • 在 /config/application.rb • config.i18n.default_locale =
:zh-TW • 語系檔放在 /config/locales ⽤用 YAML 撰寫
Internationalization (cont.) • I18n.t(key) # 任何地⽅方皆可使⽤用 • I18n.t(key, scope: scope)
# 任何地⽅方皆可使⽤用, 並指定 scope • t(key) # View Helper • t(key, scope: scope) # View Helper with scope
Timezone • rake time:zones:all # 得到所有時區清單 • rake time:zones:us #
美國地區的時區清單 • rake time:zones:local # 當前地區的時區清單 • rake time:zones:all OFFSET=8 # +08:00 的地區
Timezone (cont.) • time_zone_select # FormHelper
Timezone (cont.) • Time.current • Date.current • 10.days.ago • 1.days.from_now
• … • 以上都會吃到 Timezone 設定
Timezone (cont.) • Time.now / Date.today => 沒有吃到 Timezone 設
定
DEMO
懶得寫⼀一堆 i18n 怎辦
懶得寫⼀一堆 i18n 怎辦 • rails-i18n • http://github.com/svenfuchs/rails-i18n
為薄滴賽 • ⼀一個討論 Web Design / Development 的 Facebook Group
Q & A
Thank you