diff options
author | Benny Baumann <BenBE@geshi.org> | 2014-11-23 15:21:16 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2014-11-23 15:21:16 +0100 |
commit | 1cc5257aba1e6ae883caf464eaadf25783d2279d (patch) | |
tree | c9274d32c2cdee6af9b7fafab759c3862f3f693f /includes/lib | |
parent | 0bae20ba9f726c964eaee62a3b41c2da65bb8f0b (diff) | |
parent | 0950de5691c8f3e6b3115413e54d4932a2c923c7 (diff) | |
download | cacert-devel-1cc5257aba1e6ae883caf464eaadf25783d2279d.tar.gz cacert-devel-1cc5257aba1e6ae883caf464eaadf25783d2279d.tar.xz cacert-devel-1cc5257aba1e6ae883caf464eaadf25783d2279d.zip |
Merge branch 'bug-28' into release
Conflicts:
includes/account.php
scripts/cron/warning.php
www/disputes.php
www/wot.php
Diffstat (limited to 'includes/lib')
-rw-r--r-- | includes/lib/l10n.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/includes/lib/l10n.php b/includes/lib/l10n.php index e325add..4859946 100644 --- a/includes/lib/l10n.php +++ b/includes/lib/l10n.php @@ -355,4 +355,21 @@ class L10n { bindtextdomain($domain, $_SESSION['_config']['filepath'].'/locale'); textdomain($domain); } -}
\ No newline at end of file + + public static function set_recipient_language($accountid) { + //returns the language of a recipient to make sure that the language is correct + //use together with + $query = "select `language` from `users` where `id`='".intval($accountid)."'"; + $res = mysql_query($query); + if (mysql_num_rows($res)>=0) { + $row = mysql_fetch_assoc($res); + if (NULL==$row['language'] || $row['language']=='') { + self::set_translation('en'); + } else { + self::set_translation($row['language']); + } + } else { + self::set_translation('en'); + } + } +} |