summaryrefslogtreecommitdiff
path: root/includes/locale.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/locale.inc')
-rw-r--r--includes/locale.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/locale.inc b/includes/locale.inc
index 3e35bfd70..85b03eccb 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -1,9 +1,12 @@
<?
+function locale_load() {
+ global $languages, $user;
+ return ($user->language) ? $user->language : key($languages);
+}
+
function t($string) {
- $result = db_query("SELECT id FROM locales WHERE english = '". addslashes($string) ."'");
- if (!db_fetch_object($result)) db_query("INSERT INTO locales (english, location) VALUES ('". addslashes($string) ."', '". check_input(getenv("REQUEST_URI")) ."')");
- return $string;
+ return locale($string);
}
?> \ No newline at end of file