Link Inlining Optimization for Android
Article Summary
Alex Dadukin from Just Eat Takeaway reveals how inline links in Android apps create a localization nightmare. Their team evaluated three common approaches and found them all fundamentally broken.
Just Eat Takeaway's Android team tackled the messy problem of clickable text links embedded in localized strings (think privacy policies and terms). After auditing their fragmented implementations, they discovered each approach had critical flaws around translation accuracy, code complexity, and maintainability.
Key Takeaways
- String concatenation approach requires 2n+1 separate resources for n links
- Substring matching breaks with duplicate text or mistranslations
- HTML syntax embeds URLs directly, blocking custom deeplink actions
- Markdown-like syntax with IDs enables link-agnostic, linear-time parsing
- New approach separates link identifiers from URLs for better localization
Critical Insight
A custom Markdown-inspired syntax solves Android inline link localization by using identifiers instead of hardcoded URLs, reducing cognitive load while supporting arbitrary styling and custom click actions.