Hi my name Sergey Shutov.
Open file /data/inc/variables.all.php find 20 line and change this code
require_once ('data/inc/lang/en.php'); if ($langpref != 'en.php') require_once ('data/inc/lang/'.$langpref);
//Set/change new lang session if (isset($_GET['lang'])) if (is_dir('data/settings/pages/'.$_GET['lang'].'/')) $_SESSION['lang'] = $_GET['lang']; //Check user session language if (!$_SESSION['lang']) $_SESSION['lang'] = "en"; $langpref = $_SESSION['lang'] .".php"; require_once ('data/inc/lang/'.$langpref);
Now, in this file, find line
$page_dir = 'data/settings/pages';
and change with this
$page_dir = 'data/settings/pages/'. $_SESSION['lang'];
Go to /data/settings/pages/ and create you'r language folder, like this "en" "ru" "de", and make folder read+write
1. Go to admin panel, create page
2. In browser open http://site/
OK. Why is only english? Because english is default language.
Now turn to other language, like that
Go to admin panel and create new page.
Return back in site.
p.s: If you wont other default language, than just change $_SESSION['lang'] = "en"; with your's language, example: $_SESSION['lang'] = "ru";
Thank you very much, good bye
Last edited by danker (21-08-2011 04:40:03)
Hi danker, is this for pluck 4.7?
Maybe it is also possible to develop simple features like this in the form of a module, using the new hooks system. Then you don't have to edit any code and users can install it in a very simple way. For more info about the hooks, see the Module guide.
BTW, if you want to request any new hooks, see this thread.
Yes. pluck 4.7.