Jump to content

multilang pages - speed concerns


jeffz2008

Recommended Posts

Most common way (according to what I have seen of course) to serve multilang tool-texts (not a content! difference on the bottom) is to serve it from defined constants stored in files, which are stored in lang specific folders.

e.g.: :

define('SOMETHING', 'Something');

 

QUESTION:

Would that be a big possible system slow-down, if such multilang content is to be served from database?

 

I appreciate your opinions, observations, experiences in such matter.

 

EXPLANATIONS:

tool-texts - I understand them as static page elements, helping to use page (e.g informational element etc.)

content - dynamic page elements, e.g. system user entered product description, user entered post etc.

Link to comment
Share on other sites

sorry, you've kinda lost most of us.. do you mean you want to serve lets say, ASP from a database, and why would you need a constant?

 

Sure serving code from a database is perfectly fine if you optimize your code for speed.. making only 1 mysql_query for code would be very very wise, however you could skate with 2, but anything after two on a high traffic server will be pretty much 'noticably' slower. also it has to do with the amount of data you're fetching.

 

best of luck :)

Link to comment
Share on other sites

RussellReal thanks a lot for taking time.

 

Let me explain on osCommerce (open source shopping cart) example, as it demonstrates well what I have in mind.

----------------------

Text on e.g. product page consist of:

-- dynamic content - e.g. product descriptions etc. fetched from DataBase

-- static (language specific) content fetched from ... let's call them ... language pages, e.g texts like: "Please complete your selection" if there is something left to select for customer. Sort of .. part of interface.

 

That static content is kept in language files in this way:

//english version language file
define('SELECTION_COMPLETE', 'Please complete your selection');
//eg. spanish version language file
define('SELECTION_COMPLETE', 'Whatever way "Please complete your selection" goes in Spanish ');
//etc.

 

While client sees that as :" Please complete your selection", codewise it would look like this:

echo SELECTION_COMPLETE;

 

There is a proper language file serving mechanism on top of file, for a script to select from right language version.

 

Question was : which do you think is faster:

-- serving constants (delimited data) from file, or

-- same lang. specific interface elements from DataBase

 

Footnote:

define('SELECTION_COMPLETE', 'Please complete your selection');

instead of constant, delimited csv/txt etc can be used.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.