1

<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
    <div id="toc" class="toc">
        <div id="toctitle">
            <h2>Inhaltsverzeichnis</h2>
        </div>
        <ul>
            <li class="toclevel-1 tocsection-1">
                <a href="#Special_features">
                    <span class="tocnumber">1</span>
                    <span class="toctext">Special features</span>
                </a>
            </li>
            <li class="toclevel-1 tocsection-2">
                <a href="#Importance_for_search_engine_optimization">
                    <span class="tocnumber">2</span>
                    <span class="toctext">Importance for search engine optimization</span>
                </a>
            </li>
            <li class="toclevel-1 tocsection-3">
                <a href="#Web_links">
                    <span class="tocnumber">3</span>
                    <span class="toctext">Web links</span>
                </a>
            </li>
        </ul>
    </div>
</div>

My table of contents seems to have a weird problem. Whenever I am logged in to my English wiki, it displays correctly as "content". As soon as I am logged out, it displays as "Inhaltsverzeichnis" which is German. It seems to get that info from my browser.

Languages are saved in my wiki/languages/i18n/ files.

Has anyone got a clue why this is happening?

Termininja
  • 6,620
  • 12
  • 48
  • 49
Divide by Zero
  • 1,343
  • 1
  • 14
  • 37
  • 1
    Is it in German only the title of content or the whole table together with the other text from the [page](https://en.onpage.org/wiki/Above_the_fold)? – Termininja Jan 07 '16 at 13:55
  • Only the TocTitle has the wrong language. Everything else (content of the page, acrticle and toc contents) got correct language settings. There is one other thing though: If i use my wikis search functionality, the word "search results" is also changed to german... – Divide by Zero Jan 07 '16 at 14:18
  • 1
    and... on some other browser, did you try it? – Termininja Jan 07 '16 at 14:30
  • It is quite confusing. I tried in firefox. It is the other way around: When i am logged in, it displays wrongly: Inhaltsverzeichnis. If i log out, it displays as "content". I have got no idea where this stems from. – Divide by Zero Jan 08 '16 at 15:18
  • Is this the standard TOC or something generated by an extension? Is it included in the body, or in some skin element like the sidebar? Do you have some i18n extension or gadget enabled, like UniversalLanguageSelector? Are there German-speaking users in your wiki which may have visited that page? What language did you set in your MediaWiki user preferences, what is the default of the wiki and what do your browser(s) have as accept-language? – Nemo Feb 16 '16 at 10:26

1 Answers1

0

IIRC, the most common cause is that the system message containing the translation of the TOC title is cached in the wrong language. Ensure you configured the caches correctly: https://www.mediawiki.org/wiki/Manual:Cache

To find out where the problem lies, use eval.php to query with \Cdb\Reader::open and MessageCache, as in https://phabricator.wikimedia.org/T131981#2186195

Nemo
  • 2,441
  • 2
  • 29
  • 63