How-To for simple i18N with phpCMS
- Name your content files in the different languages 'page.de.html', 'page.en.html' etc. and put them all in the same directory.
- Place the files language_links.php and scripter.php into your plug-in dir (usually /parser/plugs/).
- Call the i18N plugin at the beginning of your header-template:
{PLUGIN FILE="/cms/plugs/scripter.php" TYPE="STATIC"} - Put the {SCRIPT_LANGLINKS} placeholder at the location in your template where you want the language links to appear.
- You may want to put an .htaccess file into your DOCUMENT_ROOT with the following content:
DirectoryIndex index.en.htmlor whatever your default language happens to be. - That's it :)
Additional Info
In case you aren't using the search function, you don't need multiple home.[de|en].tag, and home.[de|en].mtpl files. These are used mainly to output different text on the search page.
Search
You need to create separate search indices for each language. In order for Langs2Link to let you switch between search results pages, the data directories need to be called "suche_de" and "suche_en". If your index directories are named differently, you need to change the value for "datadir" in the search form of the template. In any case it's important that the data directories end in "_en", "_de" and so on.
Credits
Thanks to Iggi for this XSS vulnerability proof plug-in.