Skip to content

docs(surveys): add survey translations guide#16983

Open
lucasheriques wants to merge 1 commit into
masterfrom
posthog-code/survey-translations-docs
Open

docs(surveys): add survey translations guide#16983
lucasheriques wants to merge 1 commit into
masterfrom
posthog-code/survey-translations-docs

Conversation

@lucasheriques
Copy link
Copy Markdown
Contributor

Summary

Documents the survey translations feature now shipped across all four PostHog SDKs.

Covers:

  • How the SDK resolves a display language at runtime (explicit override → language person property → device/browser locale).
  • The case-insensitive matching algorithm with base-language fallback (e.g. pt-BRpt).
  • Which fields are translatable at the survey and question level, and which intentionally are not (the survey-level description).
  • Per-SDK configuration snippets for the overrideDisplayLanguage / override_display_language option.
  • The $survey_language event property and how to use it for breakdowns.
  • A short FAQ.

SDK versions referenced

SDK Minimum version
posthog-js 1.372.3
posthog-react-native 4.44.0
posthog-ios 3.59.0
posthog-android 3.45.0

iOS and Android merged today; their version numbers will be cut on the next releases of posthog-ios (`3.59.0`) and posthog-android (`3.45.0`) via their changeset/release workflows.

Screenshots needed (follow-up)

The doc contains two placeholder comments (``) for visuals that would make the page sharper but require access to the production app UI:

  1. Survey editor → Translations panel — language picker + the per-language fields for `name`, `thankYouMessage*`, per-question `question` / `description` / `buttonText` / `choices` / `lowerBoundLabel` / `upperBoundLabel`. Light + dark mode.
  2. Insight breakdown by `$survey_language` — `survey sent` event with `$survey_language` as the breakdown dimension.

Happy to follow up with the actual images once captured, or another contributor can swap them in.

Test plan

  • Doc renders without MDX errors locally (`gatsby develop`).
  • Sidebar shows "Translating surveys" between "Conditional questions" and the "PostHog AI" section header.
  • All anchor links in the doc resolve.
  • Code snippets compile against the documented SDK versions.

Created with PostHog Code

Document the survey translations feature now available across all four
SDKs (posthog-js 1.372.3+, posthog-react-native 4.44.0+, posthog-ios
3.59.0+, posthog-android 3.45.0+):

- How the SDK resolves a display language (override → person property →
  device locale) and matches it against the survey's translations map
  (case-insensitive, with a base-language fallback).
- Which fields are translatable at survey and question level, and which
  intentionally are not (survey-level `description`).
- Per-SDK config snippets for `overrideDisplayLanguage` /
  `override_display_language`.
- The `$survey_language` event property and how to break down responses
  by language.

Two screenshot placeholders are included for follow-up: the survey
editor's translations panel, and an example insight breakdown by
$survey_language.

Generated-By: PostHog Code
Task-Id: 22f7fe99-61e4-4d54-90c9-24788c083799
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview May 21, 2026 09:41PM

@github-actions
Copy link
Copy Markdown
Contributor

Vale prose linter → found 4 errors, 10 warnings, 7 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/surveys/translations.mdx — 4 errors, 10 warnings, 7 suggestions
Line Severity Message Rule
2:20 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
11:158 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
18:46 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
27:35 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
27:69 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
53:154 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
63:3 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
64:3 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
65:3 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
65:11 warning Use 'iOS' instead of 'ios'. Vale.Terms
66:3 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
66:11 warning Use 'Android' instead of 'android'. Vale.Terms
72:53 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
72:73 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
72:205 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
128:48 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
128:135 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
140:124 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
140:175 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
150:86 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
160:68 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant