Page 1 of 1
Language redirection
Posted: Wed 8. Jun 2005, 14:44
by marcelap
Hope someone can help me with this! i am trying to follow pepe's tutorial ... but i am afraid i don't get it

... by saving the script in:
Save as scripts/strip-prefix.php
???
oh, what does this mean? should i open a new folder call scripts? and inside save the strip-prefix.php
i have a site in german, and want to switch languages to english. where do i save all my english structure?? i mean, my whole menu (über, kontakt, etc. would also be about, contact ..) in the same structure? just a new + open and call it about ... and make it invisible
oh, i think i am too lost ....
i would appreciate some help!! thanks!
Language redirection
Posted: Wed 8. Jun 2005, 14:47
by marcelap
oh, forgot to put this! the tutorial i am trying to follow is this one ...
http://www.phpwcms.de/forum/viewtopic.p ... sc&start=0
Posted: Wed 8. Jun 2005, 15:24
by pierre.meli
Ciao Marcela,
I followed the same guide you are referring to and it works fine.
To your question: yes, you create a directory in your phpwcms home directory and copy this script into it (you can change the name if you don't like it):
To create the script you can use Notepad and copy the code into it.
The structure in phpwcms looks like this, if you want to take the example of
http://olsen-traductions.ch:
For every element of the structure, you need to define an alias in the admin section of phpwcms. The name after the language needs to be identical and you have to decide in which language you want them, or use a bilingual alias (may improve the search engine ranking, if important), as for example:
German: de_contact-kontakt (or just de_contact)
English: en_contact-kontakt (or just en_contact)
To have a different image on the top, I have created 2 different templates - 1 for the french (english in your case) and one for the german documents:
In my case the switch is done by clicking on the image in the top section (I don't use this area as "home" link):
For the french template to switch to german:
Code: Select all
<!-- switch -> deutsch -->
<a href="index.php?de{PHP:scripts/strip-prefix.php}" target="_self">{IMAGE:titre-d.jpg}</a>
respectlivley to switch back to french in the german template:
Code: Select all
<!-- switch -> français -->
<a href="index.php?fr{PHP:scripts/strip-prefix.php}" target="_self">{IMAGE:titre-f.jpg}</a>
I hope this helps
Cheers Pierre
Language redirection
Posted: Wed 8. Jun 2005, 15:59
by marcelap
thank you so much!!!!
i still have a question. i am following your directions, but i have a doubt regarding the site structure ... if i organize in the structure this big two folders (de and en, and from there onwards as you did ... why does it look weird in my case... you can have a look at what i mean:
http://www.intercentar.de/index.php?id=23,0,0,1,0,0
should i hide the "de"? but then i dont see the whole menu ... ohhh, hope not to sound too silly!
thanks a lot for the help!
Language redirection
Posted: Wed 8. Jun 2005, 16:29
by marcelap
hi Pierre
oh, do you have any idea why when i save the structure, and i put an alias such as:
de_kurzinfo, when i open it again, it will say:
de_kurzinfo_wxq (and if i deleat this wxq, when i reopen it, it will put some other new three letters ...)
and in my menu it will read
+ de and only when i click in de, it will show the submenu: über, finanzierung, kurzinfo, etc. how did you do so that you don't see that +de and +en ???
thank you so much again for your reply!!
Posted: Wed 8. Jun 2005, 16:56
by pico
Hi
this happens when a Alias was used before and you have deleted this - but phpWCMS does not do a 'hard' delete in the SQL-Database, it only set a Flag that it was deleted.
If you want to clear the deleted Structure-Levels go to phpMyAdmin or something like that and delete the Datasets where the acad_trash Field contains a '9' in Table phpwcms_articlecat
Posted: Wed 8. Jun 2005, 18:00
by marcelap
oh, if i go to phpMyAdmin it opens a new window saying:
There is no phpMyAdmin available at the moment.
You can download it as separate file at:
http://www.phpwcms.de
http://www.sourceforge.net
do you know what do i have to do?! and do you know if i have this ALIAS with the three letter, should i put this same three letters in the ALIAS_EN (for the english page) too
thank you!!
Posted: Wed 8. Jun 2005, 18:07
by Kosse
Hi marcelap,
you have to enable phpmyadmin in backend!
There are some post in forum (search function

) about that.
Or, if you work online:
go to phpmyadmin of your hosting company, they usually have one for you enabled. If you work offline (on your localhost machine/PC whatever): simply open phpmyadmin (with easyphp for example).
Cheers,
Posted: Wed 8. Jun 2005, 18:11
by pico
Hi
look if your Provider have it already installed for you - or downlaod phpMyAdmin from the Links you see and copy the extracted Files to
../include/inc_ext/phpMyAdmin
and edit the config.inc.php in this Folder for your Database-Settings
Posted: Wed 8. Jun 2005, 18:43
by pierre.meli
Marcela,
there is also a simpler solution that I use to do having no time. Just change the alias to something similar that was not yet used so far:
If you deleted de-this_alias, change it to de-this-alias
That works and you don't need to manipulate the DB with phpMyAdmin
Cheers Pierre
Posted: Thu 9. Jun 2005, 10:47
by marcelap
thanks a lot pierre for the tips!!!