docs(surveys): add survey translations guide#16983
Open
lucasheriques wants to merge 1 commit into
Open
Conversation
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
Contributor
Deploy preview
|
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!
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the survey translations feature now shipped across all four PostHog SDKs.
Covers:
languageperson property → device/browser locale).pt-BR→pt).description).overrideDisplayLanguage/override_display_languageoption.$survey_languageevent property and how to use it for breakdowns.SDK versions referenced
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:
Happy to follow up with the actual images once captured, or another contributor can swap them in.
Test plan
Created with PostHog Code