Dr-SeMSeM Posted June 16, 2009 Share Posted June 16, 2009 Hi all ,currently im planning with a friend to create multi language websiteAIM :depend on regisration of the website and chose the default language .. and then to manage his owen saved texts on the website thats mean every member will have his owen saved notes or calendar ... so , what is the best way to create it under multi language and by the way ..how to create add language function to add more in the future ?im thinking in the next :to make language files inside folders ( such as IPB software ) and create it basically on another language ..then we translate it manually .... and the skin will be standard and may change some features .. such as chosing a skin with the language ... etc fainally : What is your advise to start the project correctly ... thanks for advance Link to comment Share on other sites More sharing options...
justsomeguy Posted June 16, 2009 Share Posted June 16, 2009 For the languages, the easiest way is to put all text strings that you want to translate into an include file for each language. The file should just define all of the text variables. When they call up a page, you figure out which language to use and include the appropriate file first, then when you write out the page you use the variables for the text strings. e.g.: <?php$lang = array();$lang['welcome'] = 'Welcome!';$lang['login_prompt'] = 'Enter your username and password below.';$lang['login_username_error'] = 'The username was not found.';...?> <?phpinclude 'languages/en.php';echo $lang['welcome'];...?> Link to comment Share on other sites More sharing options...
Dr-SeMSeM Posted June 17, 2009 Author Share Posted June 17, 2009 thanks very much for your help ill start today and told you about the starting results thanks again Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.