Localization
Contents
Product Tours is currently in private alpha. Share your thoughts and we'll reach out with early access.
Currently only available on the web. Requires posthog-js >= v1.324.0.
Configure your tours, banners, and announcements to display in the user's locale.
How it works
For tours and announcements, you can create any number of Translations.
Each translation is keyed on a BCP 47 language tag.
When a tour or announcement is displayed, PostHog chooses the translation based on the user's browser language or your override_display_language config setting.
Creating translations
Set the default language
First, set the default language for your tour.
When you set a default language, all existing tour content is mapped to the new default.
This is used as a fallback when the user's language cannot be determined, or when your tour does not support the user's provided language.
Open the Translations panel in the editor, and enter a language code that represents your tour's default.

Add a new language
Once the default is set, you can add more languages in the same Translations panel.
Enter a new language code, click the plus button to add it, then click the language card to select it.

Once selected, a new language code appears at the top of the editor, and you can make any changes necessary for this translation.
If you have other translatable fields beyond the pop-up content, they appear below the content editor.

Language code matching
When determining which tour translation to use, we run the following checks in this order:
- Exact match – A user with language
en-USmatches a tour with translationen-US. - Base match – If no exact matches are found, we check for translations matching the user's "base" language. For example, a user language
en-GBwill match a tour with translationen, if no translation exists specifically foren-GB. - Fallback – If neither of the above are successful, we fall back to the tour's default language.
A user with language en will not match a tour translation en-US. For this reason, we recommend keeping your translation keys as base-only (like en), unless you have translations for specific dialects.
Language overrides
By default, PostHog uses the user's browser language to determine which tour translation to show.
This can be overridden by setting the override_display_language property in posthog.init.
You can also use the posthog.set_config method to change the configuration after initialization.
Which languages should you support?
This is different for everyone, but you can quickly check common browser languages from your users by running a query like this in the SQL editor:
This will show the top 100 languages based on $pageview events, grouped by distinct IDs, in the past 30 days.
