How to localize your content

Before we jump into the localization itself, it's important to learn how we detect the current language.

Setup supported languages

First, go to the Workspace settings (click on the Workspace name in the top right corner) and find the Supported languages section. Add all languages you want to be supported in Product Fruits. Usually, it should match the languages supported by your application.

Once you save the settings, every Product Fruits tool should display a dropdown with these languages. When you switch the language in the dropdown, you can edit and localize the content for that language.

How do we detect the language of the user?

We don't detect it, you will tell us. In the Product Fruits code snippet, there is the language parameter. You have to pass the current language of the user. This way, we will know what localized version we should display. Read more on this in the installation guide. Please ensure that the language code that you set matches the content that your cards are in, otherwise you will encounter cards being rendered with blank content.

Tours and hints

You can translate all cards to different languages by switching the language dropdown in the editor. Currently, we don't support fallbacks to a default language.

You may want to display different tours/hints for different languages or you want to restrict the tours/hints only to some languages. You can use the Display for settings in the tour/hints detail. Select Rules, add the condition, select Language, and select the desired language.

RTL support

We support RTL in our tools. By default, we will inherit RTL settings from your application. If your application sets dir="rtl" attribute on the <html> or <body> element, we will read this and display all PF content in RTL alignment.

We also support RTL in our knowledge base. If you edit your article in an RTL language, the editor will automatically switch to the RTL layout.