Welcome to Geeklog Thursday, December 14 2017 @ 07:51 pm EST


Status: offline

eyecravedvd

Forum User
Full Member
Registered: 09/06/2003
Posts: 152
I'm just curious if it wouldn't be easier to add this to the db rather than keep it in a file.

This way you can add phrases easily and change languages from the admin interface rather than in config.php and languagefile.php

Just a thought.
Shane | www.EyeCraveDVD.com

Status: offline

Tony

Site Admin
Admin
Registered: 17/12/2001
Posts: 405
Location:Urbandale, Iowa
Shane, long time no see, man. You have a point. Problem is tranlsations are best handled in files. When a new set of updates to the default language is made, we should be able to send the file to translators to get their corresponding updates. Your point about having an admin interface to the current language is still valid though. You can build such a system to go against files instead of the database. I don't like using the database for this sort of thing as it greatly increases the DB load. For GL2 I already have a translation class that works against XML files. Using XML makes it easy to build a GUI around and I even have a slick utility that will merge two files. The nice thing about merging is a translator can take, for example is GL version 1 translation and merge it with our updated version 2 translation and only have to edit the *new* entries (i.e. it retains changes made to version 1).

Hope this all makes sense, if not feel free to ask more questions.

--Tony
The reason people blame things on previous generations is that there's only one other choice.

Status: offline

eyecravedvd

Forum User
Full Member
Registered: 09/06/2003
Posts: 152
It makes sense I understand where you coming from. It's just that VBulletin, which I'm sure you've heard of, is doing it with version 3 of their forum software and it's running speedy even on really large sites. I'm not exactly sure how they do it though although I do believe it has something do to with XML.

I just thought I'd toss your way.

Thanks for the reply Tony.
Shane | www.EyeCraveDVD.com

Status: offline

Tony

Site Admin
Admin
Registered: 17/12/2001
Posts: 405
Location:Urbandale, Iowa
Yeah, I looked into what Vbulletin had just a second ago and you are right, they may do this via the database. I'm not sure how this would effect performance but I can say because the package I have is OO, it would be pretty easy to modify it to use a database. Granted, there would be some other things I'd have to add to make it work but it is possible. Also, I may add the concept of group phrases. We have something sort of like that today in 1.3.x but using group phrases would make db-based language handling perform better because I could say something like "give me all phrases for the article plugin".

If anybody is interested in taking this on I can point you in the right direction and this would be a great way to ramp up on PHP and specifically PHP5. Otherwise this will have to wait until I get around to it.

--Tony
The reason people blame things on previous generations is that there's only one other choice.

Status: offline

eyecravedvd

Forum User
Full Member
Registered: 09/06/2003
Posts: 152
Tony,

I looked into this a little more as well. I looks as though they cache the info somehow. I'm not really sure how they pull it off yet. I'll keep looking and let you know of my findings
Shane | www.EyeCraveDVD.com

geeklog-fan

Anonymous
the development version of phpbb also uses caching if I am right??

http://area51.phpbb.com/phpBB22/

Status: offline

Tony

Site Admin
Admin
Registered: 17/12/2001
Posts: 405
Location:Urbandale, Iowa
If anybody can link me to projects using some sort of caching that would save me some time so that when I get back to the translation piece I don't have to do as much digging. I know PEAR has a couple of Caching Packages. I think the key is the translation piece really needs to be able to run from files (XML) and the database. How you would cache would be drastically different depending on the method used. Anyone with experience in this stuff who can chime would would be a welcome addition to this conversation.
The reason people blame things on previous generations is that there's only one other choice.

Status: offline

eyecravedvd

Forum User
Full Member
Registered: 09/06/2003
Posts: 152
Tony. I'm no programming expert, but did find this article which may interest you about caching with PEAR modules.

http://www.onlamp.com/pub/a/php/2001/10/11/pearcache.html
Shane | www.EyeCraveDVD.com

All times are EST. The time is now 07:51 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content