Switch between multi-language sites PAGE TO PAGE

If you have created additional (non official) documentation or tutorials or something like that please post this here
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

Hi larmann,

indeed the script work sonly if u have exactly the same aliases!
I mean es_verein , de_verein , en_verein

Now, if u delete en_verein and try to re-create it you'll have to clean up in mysql to avoid the system creating for u en_verein_frz or en_verein_erd because in mysql table en_verein still exists, even if u deleted it from backend.

So, the solution is to go to mysql and delete manually en_verein

For my multilanguage pages (almost always fr/nl/en) I create the structure names in english so it looks more "neutral".

Cheers

Btw, to be exact (correct spanish) you should write "La asociación" ;) with ó
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

Post by larmann »

Hi Kosse!

Thanx for your reply. Actually I'm not very familiar with mysqladmin and the various tables in there. How can I finde the row I have to delete?

Thanx a lot!
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi larmann,

in articlecat the section acat_trash are filled with 9 or 9999.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

Post by larmann »

Hi Knut,

yes, there are rows with seven nines in (9999999). Should I mark them and delete the rows?

Sorry for being so cautious.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Yes thats right.
At these rows you'll find the the old entries like e.g. "es_verein_t8h".
I hope you have backup your DB.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

Post by larmann »

Hi fli-flop

a) I just made a backup of the database. It's on my hard drive now.

b) I went to the row you mentioned and deleted the rows where the entry is 9999999

c) I went to the other rows and renamed the es_verein_t8h to es_verein.

Now, all English and Spanish articles are gone. I hope the rest of the system is still undefected. The Germans articles are still all there.

Can I just start writing all English and Spanish articles again or is this not recommended?
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi larmann,

every entry e.g. "es_verein" is the one and only. Don´t rename more than one entry. This renaming you can do at the backend.

All articles gone? The entry 9999999 at acat_trash means, that the pointer e.g. "es_verein_t8h" isn´t in use. Why the articles are gone?

Ok, completely you should kill the other rows in article and articlecontent (acontent_trash) (article_deleted) = 9 ore 99999999

Do you use the 1.26 CVS? Please kill the cashe and files in backend.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

Post by larmann »

Hi fli-flop,

actually, the English and the Spanish articles were just containing a headline and three dots for the first content. This, I completly lost, but just took me half an hour to make them new. So not as bad as one may assume.

Thanx for your help! The system is great and I love it and made a (very ugly) multilangual website in just very few hours.
powerpenguin
Posts: 4
Joined: Fri 27. Jan 2006, 16:48
Location: Hamburg / Amsterdam

Post by powerpenguin »

Hi there,

I have the same problem as drmole
(running phpwcms_1.2.5-DEV if that matters)

I use the clever multilingual extension, and in the URL generated in the template, there is a space between the prefix and the category name, e.g. "en _about" in stead of "en_about"

I did a dry run of the strip-prefix.php script, it does what it should, i.e. it cleanly outputs "_about".

This is my link-code in the template:

Code: Select all

<a href="index.php?en{PHP:scripts/strip-prefix.php}" target="_self">{IMAGE:site_img/flag_en.gif}</a>
To check what happens, I changed this to:

Code: Select all

<a href="index.php?en#{PHP:scripts/strip-prefix.php}" target="_self">{IMAGE:site_img/flag_en.gif}</a>
and the link that is now generated is: "en# _about"

In other words, the malicious space must be generated by the code that is executed by:

Code: Select all

{PHP:.....}
Does anybody have an explanation/confirmation/workaround for this "bug" :?:

Thanks :!:
Cheers,

Jeroen
powerpenguin
Posts: 4
Joined: Fri 27. Jan 2006, 16:48
Location: Hamburg / Amsterdam

space "bug" SOLVED

Post by powerpenguin »

:oops: :oops: :oops:
that's what you do when you look like a panda after a long working week :oops:

I simply DID make an error in the script, but looked at the wrong place :!:
Guess what, when I pasted the strip-prefix script, a space sneaked in at the very first position of the file before the

Code: Select all

<?PHP
tag :!:

In other words, if you have this problem, make sure there's nothing outside the

Code: Select all

<?PHP ...?>
block in the script at all :!:

Other than that, it seems this way works perfectly, thanks pepe :!:
Cheers,

Jeroen
idom
Posts: 6
Joined: Wed 15. Feb 2006, 11:32
Location: Italy
Contact:

It works only for 50%

Post by idom »

I'm using 1.2.5-DEV
I have configured my site as you have wrotten.

but:
case 1
<a href="index.php?it_home{PHP:scripts/strip-prefix.php}" target="_self">italiano</a>
<a href="index.php?de_home{PHP:scripts/strip-prefix.php}" target="_self">deutsch</a>

case 2
<a href="index.php?it{PHP:scripts/strip-prefix.php}" target="_self">italiano</a>
<a href="index.php?de{PHP:scripts/strip-prefix.php}" target="_self">deutsch</a>

if I write as case 1, I can be on every page of the site and when I click "italian" or "deutsch" I am linked to the homepage of the language site. that is: if I am on the page:
index.php?de_zogglersee-lagozoccolo
and click on italian, I'm linked to: index.php?it_home
instead of index.php?it_zogglersee-lagozoccolo

if I write as case 2, when I am at the italian site and click on "deutsch", I become the italian site (on the bottom line of my browser status bar I see the link "index.php?de". and if I am on the page deutsch ("index.php?de_home") and click on "italian" I am linked to "index.php?it_home".

as you see I have 2 problems:
1: I am not able to switch between "deutsch" and "italiano" with your code
2: I can't switch between article italian -> article german, but I become the homepage as linked page.

it functions only with the direct link to it_home or de_home in the a href tag.

I think that this problem comes with the redirection. I have written:
{SITE}index.php?it_home
in the first article of the top level site structure.

this is my site structure:
Home (article with the redirection + article ID)
- Italiano ("it_home" article with the summary + article ID)
-- Paesi ("it_ort-paese" article with the summary + article ID)
- Deutsch ("de_home" article with the summary + article ID)
-- Ortschaften ("de_ort-paese" article with the summary + article ID)

Thank you, Guido
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Re: It works only for 50%

Post by pepe »

idom wrote:.
.
.
this is my site structure:
Home (article with the redirection + article ID)
- Italiano ("it_home" article with the summary + article ID)
-- Paesi ("it_ort-paese" article with the summary + article ID)
- Deutsch ("de_home" article with the summary + article ID)
-- Ortschaften ("de_ort-paese" article with the summary + article ID)

Thank you, Guido
Hi Guido,

do you know, that the names it_home and de_home as well as it_ort-paese and de_ort-paese (and so on)

are the ALIAS-Names of the categories (ADMIN) and NOT the titles of the articles inside the categories :idea: :?: :?: :?: :idea:
idom
Posts: 6
Joined: Wed 15. Feb 2006, 11:32
Location: Italy
Contact:

Post by idom »

yes, I have written them so you can understand the link. I have written them under admin -> site structure -> Paesi (edit) -> alias this category:
you can see it here: http:www.idom.org
Guido
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

And now change this:
<div id="leftBlockLanguage">
<a href="index.php?it_home" target="_self">italiano</a>
</div>
to that:
<div id="leftBlockLanguage">
<a href="index.php?it{PHP:scripts/strip-prefix.php}" target="_self">italiano</a>
</div>
idom
Posts: 6
Joined: Wed 15. Feb 2006, 11:32
Location: Italy
Contact:

Post by idom »

now it is ok. I have found the mistake: it is the path. This path is ok:

<a href="index.php?it{PHP:phpwcms_template/inc_script/strip-prefix.php}" target="_self">italiano</a>

My script is in the dir:
phpwcms_template/inc_script/strip-prefix.php
and not
scripts/strip-prefix.php

But these happened because I have read 2 explanations in 2 different posts:

The first post of Pepe says:
(Abzuspeichern unter scripts/strip-prefix.php)

and another post says:
1. copy the strip-prefix.php in your site (ex: phpwcms_template/inc_script/strip-prefix.php)
.....
6. In template put your "switch language" (for example in header)
For english pages put:
<a href="index.php?de{PHP:scripts/strip-prefix.php}" target="_self">DEUTSCH</a>
For german pages put:
<a href="index.php?en{PHP:scripts/strip-prefix.php}" target="_self">ENGLISH</a>

This second post must be corrected to:

For english pages put:
<a href="index.php?de{PHP:phpwcms_template/inc_script/strip-prefix.php}" target="_self">DEUTSCH</a>
For german pages put:
<a href="index.php?en{PHP:phpwcms_template/inc_script/strip-prefix.php}" target="_self">ENGLISH</a>

But this is also my mistake, I have copy and paste the code, I have read the explanations, but I haven't seen that the path was wrong. Can you correct the post with the wrong paths?
Guido
Post Reply