1
sottwell
Multiple languages
  • 2004/7/1 12:25

  • sottwell

  • Just popping in

  • Posts: 30

  • Since: 2004/6/23


I have tried the multilanguage hack and I really don't care for it. What occurred to me was that it should be possible to shift the "language" configuration option from the main system to the user, including adding a field in the users table, with a default of english. That way all you would need to do is make a translation of the files in the language directory, and make sure all text for output uses the defines. Does anybody else think this might work?

2
Mithrandir
Re: Multiple languages

In theory yes - but the main thing is that the CONTENT is not multilingual because there is still just one database field for each piece of content. Meaning that you can possibly change the labels of a forum, but you'd still have one language in the posting, the forum name, the menuitems etc.

I agree that the ML hack is a bastard solution, but with a few languages and rather static content (i.e. not a busy message board, but just some information pages, news once in while, articles written by staff) it is usable.

Skalpa is as far as I know hard at work on a solution, which will be better - but it ain't easy to do this on a generic level.

3
sottwell
Re: Multiple languages
  • 2004/7/1 17:38

  • sottwell

  • Just popping in

  • Posts: 30

  • Since: 2004/6/23


Yes, I'm following the dev forums on sourceforge. I believe that they are considering using gettext.

It seems to me that is should be possible to add a field to the users table for language preference, and intercept calls to get() to query the users table for that field. I do have one concern, however, about the $xoopsConfig array. Is it cached somehow, or does it get loaded afresh for each user? Or can an individual element be updated and the whole thing refreshed? I mean when a user selects from the language menu on the home page. Handling the language at that level would be the easiest, rather than going through every function that sets the language and making modifications in where it gets the setting from!

I am thinking of cloning a new table for each language, with a prefix to match the language directories. That way you can just add the prefix variable to the query to get the material for that language, or from a default if the material does not exist or is empty in case of system messages.

I am putting together a community site that I hope will be quite busy, with forums, dating, a recipe exchange, photo gallery, job listings, all kinds of dynamic stuff, so the existing hack really won't work too well for me. I fiddled around with PHPNuke for a while, but I really just don't like it nearly as well as Xoops.




Login

Who's Online

320 user(s) are online (215 user(s) are browsing Support Forums)


Members: 0


Guests: 320


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits