Page 1 of 4

Poor man's multilanguage enhancement v2.0 - enhanced

Posted: Thu 14. Apr 2005, 02:03
by Fulvio Romanin
Ok, i felt the urge for a more easy way to do multilanguage sites. Having 5-6 pages for the same subject in different languages was painful (lots of wrong cross-linking, etc.), and impossible with news systems (300 miles long pages).
So, i asked my friend Luca (http://www.malisan.it) and he made up a script for phpwcms. All you have to do is just include the script like shown in the instructions (3 mins of work, maybe, and NO PHPWMCS FILES TO MODIFY) and, in the wysiwyg editor, include your languages (including images, or whatever you want to) inside of simple but specific tags like {IT}testo{/IT} or {EN}text{EN}.

Yes, it's all. Yes, it is so simple. It's not perfect, it's not the best solution in life, but it works ;)

You can see a rolling demo here (it won't be here forever, so go look now)
http://www.rototomsunsplash.com/index.php?id=25

You can find the instructions and the code for v1.0 here
http://www.fulvioromanin.it/phpwcms/

the code for v2.0 is on a post following right in this thread

You can also consider donating ONE euro with the link at the bottom of the doc page if you like the script. Its free for you, but it has costed me something to develop it, so... ;)

Posted: Thu 14. Apr 2005, 09:31
by rushclub
nice. is it also working in the navigation?

cheers
rush

Posted: Thu 14. Apr 2005, 09:49
by Fulvio Romanin
i'm not using conventional navigation - so i can't test it - you try and tell us :D

(it should, imho...)

Posted: Thu 14. Apr 2005, 10:17
by frold
For some reason when I load: http://www.rototomsunsplash.com/index.php?id=25

I first get the code - both the italian and english text - and after a while I just get the text from one lang.....

It's like the .js file load to late and that not user friendly.

Another issue: If you have 12 lang then it would cause a heavy server loader always loading all the 12 lang even when the user just need 1 lang.

But again the system work and easy to use. :D

Posted: Thu 14. Apr 2005, 10:33
by Fulvio Romanin
i wrote it needs to be fixed - a solution will be done in the next days.
Of course it's just for not-so-huge pages and not 200-languages. Oliver is working on a different solution, so it might be good in the meanwhile...

Posted: Thu 14. Apr 2005, 10:38
by brans
I just developed another solution, without any Javascript and files to add, only your template has to be modified.

Disadvantage: Your articles become very unovervieable when using many languages.

I`m currently using it with 4 languages (no demo available, as only German is finished until now) with no problems.

--...--/index.php/topic,117.0.html

___________________________________

There are 3 advantages of this method:
  • no extra files, no code editing

    CSS is loaded before the rest => no poping up of the other languages content

    only the text is loaded and no images, where the style is display:none, which shouldn`t actually produce a high traffic

Posted: Sun 1. May 2005, 01:59
by cchhita
Hi Brans!
I really like your idea of the CSS switch for the Multilanguage support!
Has anyone else here tried this solution?
I would like to see a working site in action and how it all went.

Thanks

Posted: Sat 7. May 2005, 14:01
by brans
I have added this mod to the dev forum:
--...--/index.php/topic,117.0.html

you can find a demo link there.

Posted: Tue 10. May 2005, 03:37
by ndtoan13
I see you just change the interface's language, not the content so if someone want english interface with english content and german interface with german content what will they do??

Posted: Tue 10. May 2005, 11:34
by brans
try this:
http://www.symposium-lp.ch.vu/index.php?slp&lang=de

is the only section where I applied the hack to the content.

Posted: Wed 11. May 2005, 03:48
by ndtoan13
Can you tell me why the address does not change

Code: Select all

http://www.symposium-lp.ch.vu/index.php?slp&[color=blue][b]lang=de[/b][/color]
but the language has changed?? Do you modify database (e.g add another field...)?

Posted: Wed 11. May 2005, 11:29
by brans
No the trick is the following:

When using this inside your url: &lang=de , then a session variable will be set that tells phpwcms to make only the german part visible. You only have to do this once and therefore this is very good for SEO, because all other links but the language link can stay the same.

Maybe have a look at the tutorial --...--/index.php/topic,117.0.html and see what is done with the variable string. There won't be anything to change, only some stuff to add into your template and thats all.

Posted: Thu 12. May 2005, 03:39
by ndtoan13
brans wrote:No the trick is the following:

When using this inside your url: &lang=de , then a session variable will be set that tells phpwcms to make only the german part visible. You only have to do this once and therefore this is very good for SEO, because all other links but the language link can stay the same.

Maybe have a look at the tutorial --...--/index.php/topic,117.0.html and see what is done with the variable string. There won't be anything to change, only some stuff to add into your template and thats all.
I see, so I have said you just change the interface language!!
Because, if someone want an interface with only german lang and german content and another interface with only enlish lang and enlish content (they are independance) this mod is not suittable.

Posted: Sat 6. Aug 2005, 12:02
by Fexxx
Does it works only with the content?

{LANG:de}Ihr deutscher Text{/LANG}
{LANG:en}Your english text{/LANG}

How can I change the navigation ? Have I write it in the site structure (category title:), like this:

{LANG:de}Home{/LANG}{LANG:de}Startseite{/LANG}

???

Posted: Sat 6. Aug 2005, 12:36
by Fulvio Romanin
well, you just add the call before the navigation :D

version 2.0 is on the way... :)