Aureole Posted August 14, 2007 Share Posted August 14, 2007 I'm thinking of making a Language type thing where a file would have like... Welcome => "Welcome to my Website!"; Then instead of having text hard-coded I could get the thing from the language file so then I could make my Website more accessible to other languages... ...but I have no idea where to start, anyone got any pointers? Quote Link to comment https://forums.phpfreaks.com/topic/64831-languages/ Share on other sites More sharing options...
MadTechie Posted August 14, 2007 Share Posted August 14, 2007 have a lang.en.php file for english inside this have an array like above, it better to have the sentances store in each language as any translation software will make mistakes, unless some tell me the different between a money and an ape in french! Quote Link to comment https://forums.phpfreaks.com/topic/64831-languages/#findComment-323493 Share on other sites More sharing options...
Aureole Posted August 14, 2007 Author Share Posted August 14, 2007 Yeah I'm just thinking how to do it like I can easily make a row for lang in the user table but how do I get it to load the right lang file depending on their choice and how would I go about echoing a piece of language from the array. I tried searching Google but people here are more helpful than a Search Engine. Quote Link to comment https://forums.phpfreaks.com/topic/64831-languages/#findComment-323496 Share on other sites More sharing options...
MadTechie Posted August 15, 2007 Share Posted August 15, 2007 step one: setup a php file with the array for english. include that file and use something like str_replace to replace the text ie "{greeting}" => "Hello" once you have the site working in english you can change the php to connect to a database (if you want) Quote Link to comment https://forums.phpfreaks.com/topic/64831-languages/#findComment-324505 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.