0

Given a simple static website with only a homepage and two other pages, each containing text in two langages: English and Dutch. All contents should be held in a single php file per page:

<body>
<menu id="EN">
  <ul>
    <li>About</li>
    <li>Home</li>
  </ul>
</menu>

<menu id="NL">
  <ul>
    <li>Over</li>
    <li>Thuis</li>
  </ul>
</menu>

<article id="EN">
     Goodmorning [...]
</article>

<article id="NL">
     Goedemorgen [...]
</article>
</body>

The default can be English, so upon arrival English content is shown, unless the viewer chooses the Dutch language. Once a user clicks on a language, the system should "remember" that choice sothat further links open in the correct language. How to set this via php/css as simple as possible with a few lines code as possible? If possible at all? This would be the absolute and ultimate alternative and simplest way to have a multilingual website without setting up an entire (database driven dynamic) multilingual framework, way surpassing the modest nature of this wish).

Sam
  • 15,254
  • 25
  • 90
  • 145
  • 1
    Dont repeat the html in a onefile application. Bind language data to named variables and use them in the html. `$about = $langarray['DE']['ABOUT'];
  • $about
  • ` – JustOnUnderMillions Apr 06 '17 at 16:16
  • The rest of your question is to wide to answer. How about google: make a simple multilingual wepage based on cookies and sessions. – JustOnUnderMillions Apr 06 '17 at 16:19
  • You can remember the users choise by storing the chosen language in a cookie which can be set to be remembered for a long as you want – SuperDJ Apr 06 '17 at 16:20