Automatic language detection and redirection not working

stefan

New member
Hello,

I'm currently using your add-on on my XenForo forum with four language versions: German (default), English, Spanish, and French.

The translations and language-specific URLs are available.

However, automatic language detection does not seem to work as expected.

For example, when a new visitor with a French browser language opens the forum's homepage, the German version is displayed instead of the French version.

I tested this using GoLogin and confirmed that the browser sends the following HTTP request header:

Accept-Language: fr

I've also noticed another issue with language-specific navigation.

When a visitor is browsing the French version and clicks the forum logo or header banner at the top of the page, they are taken back to the German homepage. The selected language is lost, and subsequent thread links no longer contain the French language prefix.

Since automatic language detection based on the browser language is mentioned in your add-on description, I have a few questions:

  1. Should first-time visitors automatically be redirected to the appropriate language directory, such as /fr/?
  2. Is there a specific setting that needs to be enabled?
  3. Is this a known issue when using language directories instead of separate domains?
  4. Is it possible to automatically preserve the selected language when clicking the forum logo, header banner, or homepage navigation links?
Ideally, visitors should automatically receive their preferred language and remain in that language throughout their browsing session, while keeping all language-specific URLs accessible to search engines.

I would appreciate your advice on the recommended configuration.

Thank you!
 
Last edited:
default plugin have not auto to follow user's browser language,multi language will service for main website SEO,and i think That is not good ideaa.

Thanks for the GoLogin Accept-Language: fr repro — it made the diagnosis clear. Short answer: two of your points are by design.


The model we follow (and why it's the right one)


Visitors follow the domain / declared URL. /fr/ is always French, to everyone — including Googlebot. This is the best behaviour: the language is anchored to the URL you are on, never guessed from the browser. If a visitor lands on www.test.com/fr/, they and the crawler both get French. No surprises, no duplicate content.
Logged-in members follow their account language setting. Once signed in, the member's chosen language is authoritative and always wins. This is also the best behaviour — the user's own setting beats everything else.

So the only reliable signals are the declared URL (domain or /fr/ prefix)
 
Thank you for the detailed explanation. Your approach makes sense to me, especially regarding SEO and keeping the language consistent with the URL.

I have two additional questions/suggestions:

1. Feature request: Protect individual translations from being overwritten

Would it be possible to add a feature that allows administrators to lock selected translations against automatic retranslation, including when Force Re-translation is enabled?

For example, if I manually correct a forum title or description in English, Spanish, or French, I would like to protect that specific translation from being overwritten.

Ideally, this could be enabled individually for each translation and language, without affecting other translations or the automatic translation process. The lock should be independent of the approval status and removable at any time.

2. Bug when saving category translations

I also encountered an error when manually saving a translation for a XenForo category, for example "Modellübergreifende Themen".

The following exception occurs:

InvalidArgumentException:
Column 'translated_languages' is unknown
in src/XF/Mvc/Entity/Entity.php at line 764

XF\Mvc\Entity\Entity->fastUpdate()
src/addons/Lutish/Multihost/Entity/ForumTranslation.php:85

Lutish\Multihost\Entity\ForumTranslation->rebuildTranslatedLanguages()
src/addons/Lutish/Multihost/Entity/ForumTranslation.php:40
It appears that Lutish attempts to update the translated_languages field when saving a category translation, but the XenForo entity does not recognize that field.

Could you please investigate and fix this in an upcoming update?

Thank you for your continued development and support!
 
Feature Request: Automatic Translation of XenForo Tags

Could you also add automatic translation support for XenForo thread tags?

Tags should be automatically translated into all enabled languages, while the tags in the master language remain unchanged.

The translated tags should also be used on thread pages, tag lists, tag pages, and in SEO-friendly URLs.

Thanks ;)
 
Last edited:
Another question 😇

Question about Board URL Canonicalisation and Hreflang Settings

Hi,

I have a question about the correct Multi-Site settings for multilingual forums.

My forum uses the following language URLs:
I noticed that your screenshots show a language-specific Board URL, such as /tr.

Should I manually configure the corresponding Board URL for each language in the Multi-Site Options, or should I leave the default settings enabled?

Also, should "Enable Board URL Canonicalisation" be enabled or disabled for these language versions?

How does this setting interact with Hreflang and Support Multi Domain Canonical?

I want to ensure that Google correctly indexes each language version without canonicalising them back to the German master version.


Sorry for all the questions and the amount of input. I really appreciate your patience and support!
 
Feature Request: Translate XenForo Thread Tags

Could you also add automatic translation support for XenForo thread tags?

Tags should be translated into each configured language and displayed accordingly on thread pages, tag lists, and tag pages.

This would improve multilingual SEO and provide a more consistent experience across all language versions.

Thanks ;)
Thanks for raising this — after reviewing it, we've decided not to add tag translation, because tags are mostly proper nouns, product names and model numbers that read identically in every language, and translating them would only multiply near-duplicate tag pages without adding real value
 
Another question 😇

Question about Board URL Canonicalisation and Hreflang Settings

Hi,

I have a question about the correct Multi-Site settings for multilingual forums.

My forum uses the following language URLs:
I noticed that your screenshots show a language-specific Board URL, such as /tr.

Should I manually configure the corresponding Board URL for each language in the Multi-Site Options, or should I leave the default settings enabled?

Also, should "Enable Board URL Canonicalisation" be enabled or disabled for these language versions?

How does this setting interact with Hreflang and Support Multi Domain Canonical?

I want to ensure that Google correctly indexes each language version without canonicalising them back to the German master version.


Sorry for all the questions and the amount of input. I really appreciate your patience and support!
Keep the core Board URL at your German master (https://example.com/) and define /en/, /es/ and /fr/ only in the Multi-Site domain list (one line per language, e.g. https://example.com/en|||1|||2) — the add-on sets the board URL per request, so editing the core option does nothing. Leave "Enable board URL canonicalisation" at its default (enabled) and "Support Multi Domain Canonical" off: each language URL already becomes its own canonical base, so nothing gets canonicalised back to the German master, and hreflang is generated from the same list independently of that setting — just keep all four languages in one group (no #===# between them) and write each URL with the exact scheme/host and no trailing slash.
 
Back
Top