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
https://forums.phpfreaks.com/topic/138203-php-language-module/#findComment-722534
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
https://forums.phpfreaks.com/topic/138203-php-language-module/#findComment-722546
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.