From ae58e9696a278e5d6e9d9f1e3d973e09ab09f09c Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 11 Oct 2013 17:30:29 +0800 Subject: [PATCH] MOVED pgsql/i18n_function.sql to pgsql/i18n_translate.sql --- pgsql/i18n_translate.sql | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pgsql/i18n_translate.sql diff --git a/pgsql/i18n_translate.sql b/pgsql/i18n_translate.sql new file mode 100644 index 00000000..e075fb04 --- /dev/null +++ b/pgsql/i18n_translate.sql @@ -0,0 +1,39 @@ + + + + + +CREATE OR REPLACE FUNCTION i18n_translate(text,text,text) + RETURNS text AS +$BODY$ +-- Copyright (c) 1999-2011 by OpenMFG LLC, d/b/a xTuple. +-- See www.xtuple.com/CPAL for the full text of the software license. +DECLARE + in_ltype ALIAS FOR $1; + in_lkey ALIAS FOR $2; + in_inlang ALIAS FOR $3; + + ret TEXT; + +BEGIN + + ret := ''; + SELECT lval INTO ret FROM i18n + WHERE ltype=in_ltype AND lkey=in_lkey and inlang=in_inlang LIMIT 1; + RETURN ret; + + + RETURN ret; + +END; +$BODY$ + LANGUAGE plpgsql VOLATILE + COST 100; + +ALTER FUNCTION i18n_translate(text,text,text) + OWNER TO admin; + + + + + \ No newline at end of file -- 2.39.2