I'm sorry for beeing quiet for so long.
Beeing one of the people hacking away to implement the square brackets system to create a multilangual system, I've slowly started to form an opinion about how to implement a multilangual system.
I'll start by going though the square brackets approach, then some idears I have to implement the square brackets approach in an easier manner then currently done and finaly an idear on how to make a overall better multilangual system.
The square brackets approach does work, but it's not easy to maintain and it's a huge database "bandwidth" waster. It requires ALL text not part of the language files to be routed though the textsanitizer. A few exceptions exixts, such as the places where you edit the lines containing the square brackets, typically in admin.
The good thing about the square bracket approach, is that everything not included in square brackets will be treated as common language information.
The bad thing is that you need to remember to include the language specific in square brackets containing the language name, and that you will edit all languages at the same time.
The square bracket technics does indeed deal with all parts of xoops, including content, titles, administration, and block titles. BUT many of these still need to be hacked.
I have a number of hacks still not published on this site, but they will be as soon as time allows.
I have an idear on how to implement the hack in a global fasion. The idear is based on my lowlevel programming skills - I have no idear if it's possible within php, XOOPS or in another fasion. (The only php I know is from hacking Xoops).
I'll base this description on a C alike syntax.
Any kind of text comming out of a C program will come out one letter at a time, usualy though a routine called putchar(). The putchar rutine is the one one will patch if you need to convert from eg. Mac line-terminaltion to PC/Windows line-termination.
If XOOPS or php implements a function like that, then it would be possible to add the textsanitizer there, and thus make the system and all existing modules support the square brackets approact. The maximum linelength in both the system/modules and database will still have to be ajusted, though.
A person with intimate php knowledge may be able to make this hack.
Now for the overall system to become multilangual will require alot more the the square brackets approach.
The
multilangual system I'm currently working on, uses danish, japanese and english. The common language is english, but the danes are learning japanese, and the japanese are learning danish.
This means that if a message is written in one language only, then people reading one or the other languages should still see that message, even if it's not their selected language. To combat problems with corrupted text, all contens is using multibytes chars.
One way I can think of to implement this, is to have (in this case) three databases running, one for each language.
At any time a message is entered, it should be saved only in the database for the language selected when typing the message.
If the message is then displayed in another language, then it should automatically select the language it was originally written in. If I choose to edit the message when using another language then the one it was written in, then it should ask for a translation, and save the new translation in the current language database. If two or more translations exists, and you select to view or edit the message using another language, then it should use a prioritized list to select which translation to display.
Many aspects of this still need to be ironed out, but I belive the basis to implement this approach is available.
It could be made as a transparent layer, where the database access is controlled by some core functions, which are matched to the language selector.
A special translator module may need to be made, too, where one can select one of many source languages, and a destination language - possibly with a personal selectable preferences setting. I imagine two senarios for this translator module - one is to edit existing contents, the other is to list and edit any untranslated contents.
I'm looking forward to a discussion about this important subject.
Best regards,