Poor man's multilanguage enhancement v2.0 - enhanced

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
oli
Posts: 46
Joined: Thu 6. May 2004, 23:58

make a 1-lang (german) site multilang (en & de)

Post by oli »

if i want to make a bigger 1-lang (german) site multilang (en & de)
do i have to include all the available german content into the {de}content{/de} tags to make the script working?

or is it possible if only the new english content is typed in these {en}-tags?

but how can the german content then be hidden by javascript/css? :shock:

or is it enough to include only these few articles in {de} wich will be translated in english {en}?
:roll: this would be great!

(the other solution http://www.phpwcms.de/forum/viewtopic.p ... c&start=60 does´nt work, because not all content will be translated...)
TI&OSM
Posts: 37
Joined: Tue 27. Feb 2007, 09:30
Location: The Hague, The Netherlands

Use with Content Part "File List"

Post by TI&OSM »

I use "Poor man's multilanguage enhancement v2.0" and I like it.

I only have problems using it with Content Part "File List".
Is it possible to make a language difference between the files,
for instance downloadable pdf files in multiple languages?!

Please can somebody [Fulvio] help me out. I'm stuck!

Robert [TI&OSM]
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

How can I limit the built in search content type in wcms v1.8 to only display the current lang content?
Possible?
in theory, not possible
practically, try putting the {LANG} tags where the result is displayed
that should make a change
if i want to make a bigger 1-lang (german) site multilang (en & de)
do i have to include all the available german content into the {de}content{/de} tags to make the script working?
no
you define just the german as main language, and the tags are needed just if you want both languages, otherwise only german is more than enough

no tags -> main language is used
I only have problems using it with Content Part "File List".
Is it possible to make a language difference between the files,
for instance downloadable pdf files in multiple languages?!
well, maybe there's a workaround.
You create a first WYSIWYG content part, that contains the {LANG} part, then insert the list part with all the files in that language, then another {/LANG} wysiwyg content part and so on
this makes wcms render all, but all parts are included in that way

alternative, you use the dreaded "fulvio url technique"
- create a blank template, with just {CONTENT} in it
- create a hidden menu level where you put a different page per language
- create another template, that has this thing going
{CONTENT}
{LANG}{URL:http://www.mysite.com/index.php?id=myenglishpage}{/LANG}
{LANG2}{URL:http://www.mysite.com/index.php?id=mygermanpage}{/LANG2}

and so on....

should be working... :)
Completeness is reached through subtraction, not through addition
TI&OSM
Posts: 37
Joined: Tue 27. Feb 2007, 09:30
Location: The Hague, The Netherlands

Post by TI&OSM »

I only have problems using it with Content Part "File List".
Is it possible to make a language difference between the files,
for instance downloadable pdf files in multiple languages?!
well, maybe there's a workaround.
You create a first WYSIWYG content part, that contains the {LANG} part, then insert the list part with all the files in that language, then another {/LANG} wysiwyg content part and so on
this makes wcms render all, but all parts are included in that way

alternative, you use the dreaded "fulvio url technique"
- create a blank template, with just {CONTENT} in it
- create a hidden menu level where you put a different page per language
- create another template, that has this thing going
{CONTENT}
{LANG}{URL:http://www.mysite.com/index.php?id=myenglishpage}{/LANG}
{LANG2}{URL:http://www.mysite.com/index.php?id=mygermanpage}{/LANG2}

and so on....

should be working... :)
I found a working way, quit simple…

I made a content part 'file list' with in the title {LANG1}
and below the .pdf i have added {/LANG1}.
Then I made another content part 'file list' with in the title {LANG2}
and below the .pdf i have added {/LANG2}.
It will only see the sellected language! :D

Many thanks for the reaction,

Robert [TI&OSM]
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

as you can see - it's really easy and flexible to apply...
Completeness is reached through subtraction, not through addition
TI&OSM
Posts: 37
Joined: Tue 27. Feb 2007, 09:30
Location: The Hague, The Netherlands

Post by TI&OSM »

Fulvio Romanin wrote:as you can see - it's really easy and flexible to apply...
Thanks man!!!! :D
cbraun75
Posts: 5
Joined: Fri 13. May 2005, 22:35
Contact:

Problem with cookies

Post by cbraun75 »

Hi I have the problem:

First I want no changing of the sites language so i have a website before and there you select english and german (normal hTML site). so I need to start the phpwcms in one of the languages.

I have written a php script which calls a javascriptfunktion from the getvariables. but the probelm is i get always English i have once made the english selection. In the Internet Explorer

HTML Site Href which links to phpwcms:

Code: Select all

www.domain.de/phpwcms/index.php?lang=DE or EN
Code in the header of phpwcms:

Code: Select all

[PHP] 
if(!empty($_GET['lang'])) { 
  $_SESSION['LANG'] = $_GET['lang']; 
} 
if(!empty($_SESSION['LANG'])) {
echo "<script type=\"text/javascript\">changeLanguage('".$_SESSION['LANG']."');</script>";
} 
[/PHP]
But once i have selected the english then always i get back to english when i go to startseite link in the navigation when i'm changed it back to german (below in the footer)

Whats wrong?
In the Internet Explorer

Live Demo: http://www.galerie-geiger.de/phpwcms/index.php?lang=DE or EN

When I change to Version V1 then all is going in Firefox but in IE it made an error.
Thanx for help.
hulkie
Posts: 25
Joined: Fri 9. Feb 2007, 15:03
Location: Vienna, Austria

Post by hulkie »

Hi Romano,
I implemented yr great mod long time ago, when i was running 1.28. Now since the lightbox feature was implemented wt 1.3.2. yr mod is in conflict with this feature, which means that I would have to choose between lightbox and yr mod.

Pls see also my other post: http://www.phpwcms.de/forum/viewtopic.php?p=85924#85924

Do u have any idea how I would need to adopt your mod that both would work?
Yr help would be highly appreciated! Thanks:!:
Christian
TI&OSM
Posts: 37
Joined: Tue 27. Feb 2007, 09:30
Location: The Hague, The Netherlands

Post by TI&OSM »

hulkie wrote:Hi Romano,
I implemented yr great mod long time ago, when i was running 1.28. Now since the lightbox feature was implemented wt 1.3.2. yr mod is in conflict with this feature, which means that I would have to choose between lightbox and yr mod.

Pls see also my other post: http://www.phpwcms.de/forum/viewtopic.php?p=85924#85924

Do u have any idea how I would need to adopt your mod that both would work?
Yr help would be highly appreciated! Thanks:!:
Christian
Same here...!

And as Christian I would like to use them both at the same time!

I hope you Fulvio or someone else has a solution for this!

Thanks in advance,

Robert [TI&OSM]
TI&OSM
Posts: 37
Joined: Tue 27. Feb 2007, 09:30
Location: The Hague, The Netherlands

non DOM

Post by TI&OSM »

I have more problems with the script.

I had to implement a custom scrollbar script which also was in conflict with the poor mans language script.
The maker of that script replyed;
It is a non-dom script which *completely* rewrites the html, therefor
scraping any dom compliant and non-invasive additions to the html. It
would not be compatible with *any* dom compliant code.
And further he said;
This way, it is *not*
compatible with any other script that works unobrtusively without inline
code. (inline scripts still work because they are re-written.) (e.g. you couldn't run lightbox image viewer, for example)
So, if this is true, cause I haven't got the knowledge to confirm this,
would it be possible to change the script in a DOM script, so that it will work with other scripts?

Robert [TI&OSM]
dernier_recours
Posts: 66
Joined: Mon 2. May 2005, 17:33
Location: Canada
Contact:

No { } allowed into the summary

Post by dernier_recours »

It seems that phpwcms version 1.3.3 does not render the summary of an article if characters { or } are included.
dernier_recours
Posts: 66
Joined: Mon 2. May 2005, 17:33
Location: Canada
Contact:

Re: No { } allowed into the summary

Post by dernier_recours »

dernier_recours wrote:It seems that phpwcms version 1.3.3 does not render the summary of an article if characters { or } are included.
This was due to a conflict between {DATE:j. F Y:EN} into article_summary_list.tmpl and the tag {EN}.
dernier_recours
Posts: 66
Joined: Mon 2. May 2005, 17:33
Location: Canada
Contact:

Internet explorer problem

Post by dernier_recours »

Hi,

Internet Explorer suddenly does not filter the tags anymore. The whole page appear, text in both languages and tags. Permissions are ok. Firefox is ok.

I can't figure out the problem.
Keppn
Posts: 80
Joined: Wed 14. Jul 2004, 18:16

Re: Poor man's multilanguage enhancement v2.0 - enhanced

Post by Keppn »

Hi Fulvio!

I tried your Multilanguage enhancement and like it very much for it's simplicity and versatility. In my opinion, it's much more elegant this way, than to have doubled or quadrupled site-structures.

One problem is however, that I do need another .js-script as an IE6-transparency-fix, and those two scripts seem to collide. Possibly, because your multilanguage-script does something unusual to the DOM of the site, as another user stated.

I'd very much appreciate, if you could have a look into this problem - i'd neither have to use one of those clunky multilevelstructures, nor can I dismiss the PNG-support for IE6. Thanks a lot in advance!
Keppn
Posts: 80
Joined: Wed 14. Jul 2004, 18:16

Re: Poor man's multilanguage enhancement v2.0 - enhanced

Post by Keppn »

Well, I found a solution for my specific problem just seconds after posting:
Oliver posted it here: http://forum.phpwcms.org/viewtopic.php? ... ter#p81080

"2nd PNG workaround for IE <= 6 implemented. To use this set "$phpwcms['IE_htc_png'] = 2"."

Works perfectly :]

Nevertheless, having a DOM-compliant Poor Man's Language enhancement would still be nice.
It would even become the Bourgeoisie's Language enhancement :]
Post Reply