SocomNegotiator Posted December 23, 2008 Share Posted December 23, 2008 Well I am not sure what to do with this. I have a client who wants their site to also be in Spanish. Well do I need to re-create the whole site in Spanish. Or is there some sort of module I can get that when the user selects the language the site will change accordingly. Quote Link to comment https://forums.phpfreaks.com/topic/138203-php-language-module/ Share on other sites More sharing options...
premiso Posted December 23, 2008 Share Posted December 23, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/138203-php-language-module/#findComment-722534 Share on other sites More sharing options...
SocomNegotiator Posted December 23, 2008 Author Share Posted December 23, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/138203-php-language-module/#findComment-722546 Share on other sites More sharing options...
Mark Baker Posted December 23, 2008 Share Posted December 23, 2008 No, PHP cannot automatically translate texts from one language to another. And if it could, I wouldn't trust it to generate anything meaningful. Machine translation is inherently flawed. Ever tried using Babelfish? Quote Link to comment https://forums.phpfreaks.com/topic/138203-php-language-module/#findComment-722554 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.