Hello, I'll start a multilingual site and so I wonder what is the most efficient way, the quickest and easiest way for translators to translate the site. Many CMS use tables array (but I think it's a heavy can?) Others, such as Wordpress and Drupal use I think GetText Joomla uses files .ini (maybe the files .ini are the tables could fast PHP?) or file. xml and still in a database (which I think is the heaviest) Have you any advice in choosing? and what do you use? Regards, Peter
Use this method, make a function that selects a file, for example "Spanish.php" if the language chosen is Spanish and in Spanish.php Have for example....$LANG['SiteTitle'] = "Spanish title here"; Then, everytime you echo out text, use the function you made. E.g echo Translate($Var);
Hello, Thank you for your explanations I do not use function but I create a small script for this <?php $lang = (isset($_REQUEST['lang'])) && file_exists('/var/www/lang/'.$_REQUEST['lang'].'.php') ? include '/var/www/lang/'.$_REQUEST['lang'].'.php' : include '/var/www/lang/en.php'; PHP: Otherwise the link to create an array maybe a class like with constant this is <?php class lang { const __KEY_LANG = 'My Language Key'; const __KEY_LANG2 = 'My Language Key 2'; } PHP: