Signocore Multilanguage can send first-time visitors to the language their browser prefers, and you decide what happens when someone opens a page that has not been translated yet. All settings on this page are under Signocore ML → URLs.
How the language of a page is chosen
The address decides: a language prefix such as example.com/es/, a subdomain such as es.example.com or a separate domain such as example.es. With Hide Default Language Prefix turned on (the default), an address without a prefix is in your default language. See Language URLs.
Because every address names its language, visitors, search engines and shared links always get the same language for the same address. Browser detection only helps first-time visitors land in the right place.
Send visitors to their browser language
Choose a mode in Detect Browser Language in the Visitor Language Detection card and click Save Changes.
| Option | What happens |
|---|---|
| Off | The default. Nobody is redirected. |
| Front page only | A first-time visitor who opens your front page is sent to the front page in their browser's language. |
| Front page and translated pages | The same on single posts, pages, products and other content, and on your blog page and shop page. |
The toggle "Send first-time visitors to the language their browser prefers" in the setup wizard turns on Front page only.
A visitor is only redirected when all of this is true:
- The browser prefers a language that is active on your site. The browser's list is tried in order of preference, each as an exact match first (
es-MX) and then as the main language (es). A visitor whose browser asks for Mexican Spanish lands on your Spanish pages when you have no separate Mexican Spanish. - The page exists in that language as a published translation. Category, tag, author and date archives never redirect.
- The visitor has no language cookie yet, so they have not been on your site before or picked a language in the switcher.
- The address does not name a language already. With directory URLs, that means addresses without a language prefix. With subdomains or domains, only your main domain.
- The visitor is not a search engine, another crawler or a link preview from a social network or messaging app. Requests without a browser name are not redirected either.
- It is an ordinary page view, not a 404 page, a feed or a preview.
The redirect is temporary (302) and browsers do not cache it. After it, the visitor stays in the language they land on, and whatever they pick in the language switcher is remembered.
Note: The browser language is a best guess. Travelers, shared computers, English-language browsers used by non-English speakers, VPNs and cached pages can lead to a wrong or missing redirect. Keep a language switcher on every page so visitors can change language themselves.
Developers can change the detected language with signocore_ml_detected_language.
Cached pages and the JavaScript fallback
The redirect happens on your server while WordPress builds the page. A page cache that hands out a stored copy of the page skips that step, so first-time visitors are not redirected.
Tick JavaScript Fallback ("Also detect the language with JavaScript") in the same card when your site uses a page cache. It adds a small inline script to the pages where a redirect can happen, and the script does the same check in the visitor's browser:
- If the language cookie exists, it does nothing.
- Otherwise it reads the browser's preferred languages and sends the visitor to the translation of the page, if there is one.
- It saves the language in the cookie either way, so the check only runs once.
Clear your page cache after you change these settings, so the stored pages include the script.
The language cookie
The plugin remembers a visitor's language in a cookie named sml_language. It holds only the language code, such as es, and is not used for tracking.
- Cookie Duration (days) in the URL Structure card sets how long it lasts: 1 to 365 days, 365 by default.
- The language switcher writes it when a visitor picks a language.
- On page views, the plugin only writes it when something reads it. That is the case when browser detection is on, and when Hide Default Language Prefix is off, because an address without a prefix then shows the language from the cookie. Otherwise pages are served without a cookie, which keeps them cacheable.
- It is never set by feeds, sitemaps, the REST API, admin screens or background requests.
When a page has no translation
The Missing Translations card decides what visitors see at an address in a language where the page does not exist, for example a link someone shared or a language prefix typed by hand. Language switchers hide languages without a translation, so visitors rarely end up there through your own links.
Untranslated Page
| Option | What happens |
|---|---|
| Show the 404 page (default) | Visitors see your theme's 404 page. |
| Redirect to the default-language page | Visitors are sent to the page in your default language. |
The redirect is temporary (302) and only happens when the same address without its language part leads to a published page in your default language. For example, example.com/es/about-us/ goes to example.com/about-us/ when the About us page has no Spanish version yet. A Spanish version under its own address, such as example.com/es/sobre-nosotros/, is not affected.
Developers can change the target with signocore_ml_missing_translation_redirect.
Show Untranslated Content in Lists
While you are still translating a new language, blog pages and archives in that language can look empty. Tick post types in Show Untranslated Content in Lists to fill them up.
For the selected post types, the blog page, archives and search results in other languages also show default-language items that have no published translation in that language yet. Those items link to their default-language pages.
- Single pages are not affected.
- Only the main list of a page changes. Widgets and blocks that run their own list, feeds and sitemaps still show the current language only.
- Turn it off again when the translations are done, so each language only lists its own content.