Switching Languages with Links

An alternative to the Widget.

If you choose not to display the language widget, you'll need a way to allow your visitors to switch between available languages. Language links helps switch the language of the site dynamically, with minimal setup required and full flexibility.

Creating a link to switch languages

Create a link with the href as follows: javascript:Localize.setLanguage('xx')

Replace "xx" with the language code identifier. For example:

<a href='javascript:Localize.setLanguage("en")'>English</a>

Continue that process for the remainder of your languages.


Set the language with Javascript

Alternatively, you can set the language of the page in Javascript. Here's an example:

Localize.setLanguage('xx');

Replace "xx" with the language code identifier.

Updated 2 months ago

Switching Languages with Links


An alternative to the Widget.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.