Jump to content

PHP language module


SocomNegotiator

Recommended Posts

If the site is not currently coded for it you will have to re-code the site.

 

What you can do while you recode is put in language definitions and make them dynamic. What I do is store any phrase in a database with a column country, then when the script loads execute a query in a language file and pull out all the tables for that language and make them constants then just use those common constant names.

 

Table would have:

languageid, language, text, constantname

 

Once that is done, you can add any language you want just by adding a selction option and writing out everything in that table for the new language.

 

Hope that helps.

Link to comment
Share on other sites

Hmm...so there is no way to just get a module that will convert the text to the language selected. I know I would have to create something with the sessions so that it knows what language a user wants. But the default would be english and if they selected spanish then the text would change. Most of the text is not in a database. The site is mainly static html, but with a php framwork.

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.