r66: Moving all DB stuff to be handled by ISSO. Working with our one big $bugsys...
[bugdar.git] / docs / lang_file_to_db.php
1 <?php
2
3 // takes the locale/en.php file and loads it into the database language system
4 // SVN: $Id$
5
6 chdir('./../');
7
8 require_once('./global.php');
9
10 $sql = "
11 REPLACE INTO " . TABLE_PREFIX . "phrase
12 (varname, phrasetext, imported)
13 VALUES";
14
15
16 require('./locale/en.php');
17
18 foreach ($language AS $varname => $phrase)
19 {
20 $sqlbits[] = "
21 ('" . addslasheslike($varname) . "', '" . addslasheslike($phrase) . "', " . time() . ")";
22 }
23
24 $sql .= implode(',', $sqlbits);
25
26 echo "<pre>$sql</pre>";
27
28 $db->query($sql);
29
30 ?>