Jump to content

Recommended Posts

Hi Guys,

 

i have done a site ok, but someone was asking about multi language support (i know id need to translate every word into another language) but what would be the best way about it put the english word and the forein words in a constants file?

 

cheers

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/64568-making-a-site-with-multi-languages/
Share on other sites

U should consider site lang and articles lang. The site langs may be in different files, each of them having the same variables or arrays and depending on the user's choice, u include the specific lang file ex:

 

eng.lang.php

$lang['title'] = 'This is my site';
$lang['desc'] = 'My site is good';

 

In that way u can have the other languages. About articles then, if ure using databases, u may have another table with the same columns as the english table. Finding out wich language is set may be done with sessions (or cookies if u want to remember what the user's last lang was) and depending on the session value, u include the right lang file and select the right db tables. Guess its clear, but if not ask again.

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.