Hello,
In trust of the education level in Germany, I 'll not spend the time to include a German translation.
I used the Multi-Language script from Pepe (many thanks for your assistance) since I begun with PHPWCMS.
But every time I needed to add new pages, I felt the pain with the article aliases each new content needs to get
manually. Then the day arrived, where I decided not to continue with German pages anymore...
Last week the decision has been made to have a multi-lingual site again, but with 4-5 different languages.
When I remembered my personal alias disaster, I started to think about other CMS but I like PHPWCMS very
much and that's why I wanted to give an other idea a chance.
Our current site now uses different installations, stored in their own folders / sub domains - one for each language.
This -hopefully- gives me more advantages than the solution Pepe was providing. But I took the main idea and the
script from Pepe to make what I now have.
I organized my directory as follows:
html/en
html/fr
html/es
html/pt
then I assigned the following subs to them
en.domain.tld
fr.domain.tld
es.domain.tld
pt.domain.tld
In every template, I have links like this
Code: Select all
<li><a href="http://en.domain.tld{PHP:template/inc_script/switch.php}" target="_self">english</a></li>
<li><a href="http://es.domain.tld{PHP:template/inc_script/switch.php}" target="_self">español</a></li>
Code: Select all
<?PHP
$url = FE_CURRENT_URL;
$search = strpos($url, "domain.tld") + 9;
$urlint = substr($url, $search);
echo $urlint;
?>
Possibly there's a smarter way to do what I did but I do not have any PHP experiences...
Finally, all I need to do when I want to add a new language, is the following:
- make a database backup from the preferred sub domain. I use our English page
- create a new folder, e.g. ES, FR, PL, ...
- assign a sub domain to the new folder (Confixx, Plesk or whatever), this sometimes needs a while until is has been processed by the system
- copy the complete EN-folder into the ES-folder (http://bfexplorer.sourceforge.net) is an excellent choice if you use a larger amount of storage
- create a new database
- copy the database backup you made from the English page into the new database (I used http://www.mysqldumper.de)
- finally assign the database to the PHPWCMS installation you use in the new folder by changing it in the config.in.php
This can be done within a few minutes but you can imagine how painful it is to make a copy in the tree-view and manually change all aliases !
Now you need to insert / change the links to switch the page somewhere in your template.
I chose this solution because
- my article tree-view was horrible when I tried to manage only two (!) languages in one installation
this often results in changes I made at placed where I don't wanted to make them
- I expect easier management of language specific images, pdf-files and other external content
- I expect easier management of language specific templates
- I'm full of hope to find a way to synchronize two folders / databases, simplifying later changes
I do not have so many experiences but I think it should be possible to find a solution for adequate synchronizing.
If I need to add content to all subs, I would like to modify in the English page first, synchronize the EN-FR folders, synchronize the EN-FR
databases and make the translation in the FR-installation. That's my final target.
Stefan
-