[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4593] trunk/sql/modules/Util.sql



Revision: 4593
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4593&view=rev
Author:   einhverfr
Date:     2012-03-26 11:40:19 +0000 (Mon, 26 Mar 2012)
Log Message:
-----------
get_default_lang now defaults to English if no other suitable language is defined

Modified Paths:
--------------
    trunk/sql/modules/Util.sql

Modified: trunk/sql/modules/Util.sql
===================================================================
--- trunk/sql/modules/Util.sql	2012-03-26 11:02:59 UTC (rev 4592)
+++ trunk/sql/modules/Util.sql	2012-03-26 11:40:19 UTC (rev 4593)
@@ -21,9 +21,9 @@
 
 
 CREATE OR REPLACE FUNCTION get_default_lang() RETURNS text AS
-$$ SELECT description FROM language 
+$$ SELECT coalesce((select description FROM language 
     WHERE code = (SELECT substring(value, 1, 2) FROM defaults
-                   WHERE setting_key = 'default_language');
+                   WHERE setting_key = 'default_language')), 'english');
 $$ LANGUAGE sql;
 
 CREATE OR REPLACE FUNCTION je_get_default_lines() returns varchar as

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.