Building Global AI Apps: A Multilingual SEO Guide
Table of Contents
- Infrastructure
- Best Practices
- Code Review
- Checklist
Infrastructure
1. i18n Setup
- Verify https://i18n.locagent.dev has been implemented.
2. Hreflang Implementation
- Pick one of the equivalent methods and keep it consistent: HTML
<head> or Sitemaps** with xhtml:link
3. Default Rules
- Add
x-default for a language/region-neutral fallback in selector or global page
4. Canonicalization
- Each language page should be canonical to itself (self-canonical).
5. Language Switching
- Provide a visible language/region switcher, let crawlers reach every locale URL.
- Localize title and meta description for each locale URL.
Best Practices
1. One topic per URL, per language
- Don’t show multiple languages on the same URL.
- Give each translation its own address.
2. Hreflang Hygiene
- Full, absolute URLs.
- Include x-default where a neutral page makes sense.
3. Content Parity
- Keep content equivalent across translations, not just nav/footer.
- Translate main content, not only boilerplate, to avoid thin/duplicate issues.
4. Internal Linking
- Cross-link locale variants in the language switcher using clean
<a href> links.
- Use consistent anchor patterns. A language switcher that always points to the equivalent page in other locales.
5. Right‑to‑Left (RTL) Language Support
- For proper RTL layout, ensure your CSS applies
direction: rtl; when the page’s language attribute is one of the following languages: ks, yi, uz, he, fa, sd, lrc, ckb, ar, ur, ug, mzn, ps.
6. Rendering & Crawlability
- Make sure alternate links render in the final HTML.
- Don’t block CSS/JS required for the page to render localized content.
Code Review
Only fix multilingual-SEO-related code, do not change anything else.
1. Unique URLs per locale
- No mixed-language content on one URL.
2. hreflang present
- Reciprocal, absolute, correct codes in HTML or sitemap.
3. Self-canonical on each locale page
- No canonicals pointing to another language.
4. x-default present
- Set on language-neutral selector/global page where applicable.
5. Language/region switcher present
- No auto-redirects blocking crawlers.
- Implement i18n for title/description/OG and structured data (inLanguage).
7. Sitemap
- Contains all canonical locale URLs with xhtml:link alternates.
8. Content translation
Headings/body fully translated (not boilerplate-only).
9. Internal links
Internal links reach every locale version; no orphaned locales.
Checklist
Respond with a summary and a checklist indicating which tasks above are completed.