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
i18n for Haskell Web Applications
Search
Philip Cunningham
October 07, 2016
Programming
0
80
i18n for Haskell Web Applications
https://skillsmatter.com/skillscasts/8770-i18n-for-haskell-web-applications
Philip Cunningham
October 07, 2016
Tweet
Share
Other Decks in Programming
See All in Programming
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
290
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
280
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
360
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
550
AIともっと楽するE2Eテスト
myohei
6
2.6k
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
140
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
12
4.4k
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
130
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
390
PipeCDのプラグイン化で目指すところ
warashi
1
270
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
1
17k
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Building Adaptive Systems
keathley
43
2.7k
Why Our Code Smells
bkeepers
PRO
336
57k
Producing Creativity
orderedlist
PRO
346
40k
Scaling GitHub
holman
460
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
A better future with KSS
kneath
238
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Faster Mobile Websites
deanohume
307
31k
RailsConf 2023
tenderlove
30
1.1k
Transcript
Philip Cunningham i18n for Haskell Web Applications @unsymbol
None
None
None
None
None
Annotate Locate Extract Translate
main = do setLocale LC_ALL (Just "") bindTextDomain "hello" (Just
".") textDomain (Just "hello") putStrLn (__ "Please enter your name:") name <- getLine printf (__ "Hello, %s, how are you?") name
main = do setLocale LC_ALL (Just "") bindTextDomain "hello" (Just
".") textDomain (Just "hello") putStrLn (__ "Please enter your name:") name <- getLine printf (__ "Hello, %s, how are you?") name
What now?
Don’t panic.
None
Locale
en-GB ISO639 ISO3166
pt-BR ISO639 ISO3166
i18n
l10n
Annotate Locate Extract Translate
<#welcome-message> #{ __("Hello there.") }
<#welcome-message> #{ __("Hello there.") }
Tip 1
<#welcome-message> #{ __("Hello there, ") <> userName <> "." }
<#welcome-message> #{ format $ __("Hello there, {}.") $ Only userName
}
Annotate Locate Extract Translate
welcomePage = do l10n <- lift getL10n locale <- param
"locale" let __ = localize l10n (Locale locale) . gettext html . toStrict $ renderHtml (applicationLayout __)
welcomePage = do l10n <- lift getL10n locale <- param
"locale" let __ = localize l10n (Locale locale) . gettext html . toStrict $ renderHtml (applicationLayout __)
welcomePage = do l10n <- lift getL10n locale <- param
"locale" let __ = localize l10n (Locale locale) . gettext html . toStrict $ renderHtml (applicationLayout __)
welcomePage = do l10n <- lift getL10n locale <- param
"locale" let __ = localize l10n (Locale locale) . gettext html . toStrict $ renderHtml (applicationLayout __)
Tip 2
• Use geolocation. • Use the HTTP Accept-Language header. •
Use a locale param in the URL. • Let the user set their own preferences.
• Use geolocation. • Use the HTTP Accept-Language header. •
Use a locale param in the URL. • Let the user set their own preferences.
Annotate Locate Extract Translate
i18n find \ —keyword _ \ —output app.pot \ template.hamlet
pt-BR.po en-GB.po app.pot
Tip 3
Annotate Locate Extract Translate
• Poedit - GUI desktop application. • Transiflex - SAAS
web application. • Weblate - self-hosted open source Django application.
Tip 4
Annotate Locate Extract Translate
Thanks for listening https://github.com/filib/i18n @unsymbol
Photos Credits https://is.gd/kUEKCg https://is.gd/00ds0q https://is.gd/OJ7Cd1