Language redirection

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
marcelap
Posts: 17
Joined: Mon 30. May 2005, 21:02

Language redirection

Post 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 .... :cry:
i would appreciate some help!! thanks!
marcelap
Posts: 17
Joined: Mon 30. May 2005, 21:02

Language redirection

Post 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
pierre.meli
Posts: 42
Joined: Thu 18. Nov 2004, 23:07
Location: Switzerland
Contact:

Post 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):
Image

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:
Image

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:
Image

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
Image
marcelap
Posts: 17
Joined: Mon 30. May 2005, 21:02

Language redirection

Post 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!
marcelap
Posts: 17
Joined: Mon 30. May 2005, 21:02

Language redirection

Post 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!!
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
marcelap
Posts: 17
Joined: Mon 30. May 2005, 21:02

Post 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!!
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

Hi marcelap,

you have to enable phpmyadmin in backend!
There are some post in forum (search function :wink: ) 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,
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
pierre.meli
Posts: 42
Joined: Thu 18. Nov 2004, 23:07
Location: Switzerland
Contact:

Post 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
Image
marcelap
Posts: 17
Joined: Mon 30. May 2005, 21:02

Post by marcelap »

thanks a lot pierre for the tips!!!
Post Reply