skip to main content

kiesler.at

phpWebSite multi language content
updated by rck, 2006-03-03

Some people fancy a multi-languaged phpWebSite. Some tried out to simply set up multiple sites. Others experimented with branching. There's even a rather underused dynamic translation built into phpWebSite for just that purpose.

I've tried to set up a multi-language site and was successfull. A little bit of programming skills is almost all it takes to hack the modules you need to be able to hold multi-language content.
                     
1 | 2

The idea

During my usual visit to the phpWebSite support forums, I've stumbled across an interesting thread. Ador managed to set up a hub - two branches - two language site and was very proud of it. First, you are welcome by two flags. The "English" flag would direct you to branch #1, the "Espanol" flag would direct you to branch #2.

While Ador managed to have only one code-base for all of that (that's the branching concept after all) and thus has only one physical installation, I thought about a different approach. How about having both languages within one site? And make the user switch within this site instead of a distinct routing-page?

Well, it wasn't that hard after all. I spent more time playing with the theme than with the actual translations. But it is a quite ugly hack and might be already out-dated as the upcoming phpWebSite 1.0 has better multi-language content as far as I can tell.

The realization

Anyway. To show how a multi-languaged site could look like, I've created one. It's called "multi" and has German as well as English content. And it's also switching the interface language, as soon as you switch to the language of your choice.

Right now, multi has support for Announcements and Blocks. For simple sites, this might be all it takes. Other modules can be hacked too, though.

Would like to see it? Then please visit multi.kiesler.at. :-)

Survey

During the making of multi, I've asked myself a couple of questions. If you are interested in multi-languaged content sites, please take the time to take the polls if you can. Even if you aren't, it would be valueable to get some input for further developments.

You can see the polls on the next page.

Enjoy!
                     
1 | 2
The idea
Polls



RSSComments - Make a comment
The comments are owned by the poster. We are not responsible for its content.
  • Multi-Lingual a neccessary evil

    Posted on 2006-03-04 16:03:28 By verdon[1]

    I live and work in Canada, which is an officially bilingual country. Pretty much any site I work on that is public in nature or has received any federal or provincial funding must be bilingual. This is always a PIA. I've fooled with all sorts of approaches using branches and theme variables (so I only need one theme) and even hacking some tables so that not all modules have to use 2 databases. None of the attempts have been perfect, though some are useable. This applies to not just phpws, but also to a couple other CMS's I've used as well as e-commerce suites.

    In the long run, any steps towards better multi-lingual support is a good thing!

    BTW... how have you dealt with encoding things? For instance, if I leave the encoding to UTF8, data seems to go into and out of the db OK, though I've had to wrap a few custom export functions in utf8_decode(). The problem with this though, is that language files imported in via the language mod are not UTF8 and require a lot of fixing post import.

    [Reply ]

    • Re: Multi-Lingual a neccessary evil

      Posted on 2006-03-06 18:14:56 By trf000[6]

      How exactly is the translation done? Is it translation or is it duplicate content? How difficult would it be to add to Article Manager?

      [Reply ]

      • Re: Multi-Lingual a neccessary evil

        Posted on 2006-03-07 00:01:47 By rck[110]

        changed On 2006-03-07 00:02:02 Edited By rck (reason: )

        Translation? Duplicate Content? Where's the difference?

        What I did is simply duplicate the content fields. Instead of one title, there are two. Instead of one summary, there are two. And so on. I save both of them all the time and show them during edit time. That way, I can immediately compare the english and german versions of my text and translate them on the fly.

        Depending on the current language, I display either the one or the other set of fields. This is just a proof of concept, but I'm quite happy with it usability-wise.

        Well, of course something similar can be done with Article Manager. Quite a bit more work though -- Article Manager is rather complex. I've been trying to hack Image Library support for a teaser image into it but will need another couple of hours to do that. It simply doesn't behave.

        [Reply ]

        • Re: Multi-Lingual a neccessary evil

          Posted on 2006-03-07 16:02:36 By trf000[6]

          Well, actually there is a huge difference in a translation and duplicate content. An automatic translation likely loses something in the translation. Grammar is difficult. Use google to tranlate a website and see the problems. You can get the basic idea of what the author is trying to say, but as I said, it loses something.

          Now duplicating the content is another matter. IF a content providor is bilingual, then there is no problem. However when splitting your site among 100+ content editors, finding that many people fluent in the second language of choice (spanish for us) is difficult. I can see this working IF it could be installed on a branch by branch basis.

          [Reply ]

          • Re: Multi-Lingual a neccessary evil

            Posted on 2006-03-07 18:11:09 By rck[110]

            Well, I have thought about something else. Article Manager already stores multiple versions of the same content. The way it does that is ok for for archival purposes (serialization of content). But it isn't for translated content I guess.

            There's a need for a translation table. The current sections are the "master content". They would get a language field also each. And a foreign key to another section-table with a combined index of language and master section id.

            If the current language is the master language, the editor/author would edit the master version. If he/she isn't, there would be the master version above the current language version. As soon as the editor presses edit, the master version would still be above the current translation, but read-only text. And the editor could only edit the translation.

            Spinning this further, you could even restrict people to certain languages. And maybe do some "Article Clients", that could subscribe to another "Article Manager" database.

            [Reply ]

          • Re: Multi-Lingual a neccessary evil

            Posted on 2006-04-18 22:35:08 By Anonymous

            The greatest problem of such an automatic translator is, that it translates word after word, without understanding the sense of the text. That's the reason why you have a lot of interpretation possibilities. Automatic translators don't translate the deeper sense of the text.

            [Reply ]

RSSAll Articles
2008, 2007, 2006, 2005, 2004

What's Related

Wiki

phpWebSite

Photo Albums

phpWebSite

Article Manager

phpWebSite

Link Manager

phpWebSite

Documents

phpWebSite

Bulletin Board

phpWebSite

FAQ

phpWebSite

Latest Updates

AdministrativeTexts
updated by freddiemac1993, 2013-06-14
wiki

Re: adventures
created by brittdavis10, 2012-02-23 (1 rply, 3 views)
thread

Re: how to run phpwebsite...
created by alexander, 2011-08-25 (2 rpls, 3607 views)
thread

Re: Forum tags
created by HaroldFaragher, 2011-08-22 (3 rpls, 8488 views)
thread


Zu den KO2100 Foren