Skip to main content

Multiple Language Widget Setup

How to configure your AnnounceKit widget to serve content in multiple languages using the lang parameter

AnnounceKit supports multiple languages. To use this feature, you first need to add additional languages to your project on the project settings page.

Each project has a default language and any number of additional languages. By default, your widgets will load content in the default language.

To choose a different language when setting up a widget, use the lang property:

announcekit.push({  // Standard config  widget: "https://announcekit.co/widgets/v2/31nbbO",  selector: ".announcekit-widget",  // Show French posts and localize the widget in French  lang: "fr"})

To automatically match the widget language to the user's browser language settings, use lang: "auto":

announcekit.push({  widget: "https://announcekit.co/widgets/v2/31nbbO",  selector: ".announcekit-widget",  lang: "auto"})

AnnounceKit will match the user's browser language to the project's configured languages. If no match is found, it will fall back to your project's default language.

Did this answer your question?